All threads / guard-minitest runs ALL tests not just the ones for the target file changed

Ask A Question

Notifications

You’re not receiving notifications from this thread.

guard-minitest runs ALL tests not just the ones for the target file changed

Dan Tappin asked in Testing

I stripped my Guardfile down to this. If I edit a controller guard starts ALL tests.

guard :minitest, all_on_start: false, all_after_pass: false, spring: true do
watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/controllers/#{m[1]}_controller_test.rb" }
end

Am I missing something here?

This did the trick for me:

spring: "bin/rails test"

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,558+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.