I find all_after_pass: true a very useful option, but in a large project it simply takes too much time (for example when having acceptance/request specs).
It would be nice to have an option to limit this option somehow, e.g. that only the tests in the specific file that was saved are rerun, or only the tests in the same folder (and maybe even subfolders).
Sounds like a good idea, something like all_after_pass: ['features', 'models'] ?
all_after_pass: ['features', 'models']
Pull request is welcome, thanks!
I will take a look at it if I find the time. What API would you suggest to rerun all tests in the same file?
Maybe something like the new failed_mode option.
after_pass_mode with options like :all, :file (run all specs from the file(s)), :dir (run all specs from the same dir(s)), :none.
This would be awesome.
We may also use a specific tag to mark specs we need to run after all. E.g.
after_pass_mode: :tag, after_pass_tag: :critical
I'm closing this, because I think the whole "all_after_pass" can be replaced with 2 (or more) :rspec guards running RSpec with different tags, and the :halt_on_failure group option, e.g. like here:
Instead of supporting actions after successes, Guard::RSpec should rather focus on responding to failures (which is something Guard can't handle).