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 62,791+ 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.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.