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?

Reply

This did the trick for me:

spring: "bin/rails test"

Reply
Join the discussion
Create an account Log in

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

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

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