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

Ash Moran ash.moran at patchspace.co.uk
Fri Sep 9 08:09:08 EDT 2011

On 30 Aug 2011, at 14:45, Nikolay Sturm wrote:

> * Ash Moran [2011-08-30]:
>> 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!
> A single guard process is enough, it will start all guards defined in
> your Guardfile.

This just came in really handy. I'm helping out now and again with a new Rails project using Spork and Guard. We moved some code out into lib/ and set up a separate `guard 'rspec'` to only monitor lib/ and spec/lib/. Took a bit of jiggery-pokery to make it not use Spork and Rails but it works now, and is as fast as RSpec runs get.

I'm probably late to the party with Guard, as I used AutoTest for years. But for the benefit of anyone new to either: if you're not doing continuous testing, _you should be_*, and if you are, you should never be happy with how fast they run. They can always be faster. Always. Guard makes it much easier than AutoTest to tune the test runs, and does other cool stuff too.

*It was David Chelimsky who said the exact same thing to me on this list, what- 5 or 6 years ago? One of the best pieces of advice I ever got. Funny how for all the new fangled technology we've had in the mean time (and for all I've learnt since), I'm still using the same basic development process I used back then…



More information about the rspec-users mailing list