Is it possible to configure 'rake test' to stop running tests as soon as it hits a failure/exception?
My setup:
I'd like to start the test suite and immediately stop if a test fails -- the default behavior is to keep running all the tests which, in some cases, is too much data (especially one small bug causes a ton of tests to suddenly fail.)
I had a nice little setup going with the older version of Minitest (4.x) and the Turn gem by following this gist: (Add a simple fail-fast option to minitest/turn/minitest-rails), but I'm working on a new Rails 4.1 app right now and Turn isn't compatible with Minitest 5 (yet).
Any thoughts?
If you are using Rails 5, try rails test -f
will 'fail fast'. It means abort test run of first failure or error if you run rails test -h
You can use this new gem with Rails 4.2 and and Minitest 5.6.1: minitest-fail-fast
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With