[rspec-users] Skipping slow specs in Guard but running them from that file

Ash Moran ash.moran at patchspace.co.uk
Tue Aug 30 06:29:17 EDT 2011

On 30 Aug 2011, at 07:01, Nikolay Sturm wrote:

> I have a similar situation with the slow specs being integration specs
> in a special directory. I tagged all those example groups and setup two
> guards. The first is for unit tests and ignores all examples tagged
> 'integration' and doesn't watch spec/integration. The second guard just
> watches spec/integration and runs only examples tagged 'integration'.
> Haven't used it much yet, though.

I never thought of that! Yes, that could also work, probably better in fact. It just involves running multiple Guard processes, although there's Terminitor[1] for that!

At this point I didn't want to separate my specs into unit/ and integration/ folders. One surprisingly major reason is that I live off the RSpec TextMate bundle's Alternate File feature to swap between lib/ and spec/ files. It also makes writing the Guard matchers a lot easier (i.e. you don't have to change anything). I may change that if I find I often want to locate files by their nature.


[1] https://rubygems.org/gems/terminitor


More information about the rspec-users mailing list