Use all_after_pass: true only for certain specs? #239

jmuheim opened this Issue Jan 1, 2014 · 6 comments


None yet

5 participants


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).

Guard member

Sounds like a good idea, something like 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?

Guard member

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.

Guard member

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
e2 commented Jun 26, 2015

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).

@e2 e2 closed this Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment