Forum: RSpec Selectively running slow specs on file change with Guard

Posted by Ash Moran (Guest)
on 2011-08-30 01:22
(Received via mailing list)
Hi all (again)

Sorry for the new thread, but I don't have a copy of my own email in my 
inbox to reply to.

Anyway I managed to cobble together a hack to make Guard filter slow 
specs by default, but unfilter them if the slow file itself was changed. 
I've Gisted the relevant sections of my Guardfile and spec_helper.rb[1].

It's not very elegant, and it will probably be possible to make a much 
better version when the "hook" branch[2] of Guard is merged into master. 
But in the mean time it's giving me near-instantaneous spec runs for my 
whole codebase. Admittedly it's still a small project at the moment, but 
at 659 examples/sec on my MBP, it has plenty of room to grow now

Hope that's of some use to somebody!

Ash

[1] https://gist.github.com/1179590
[2] https://github.com/guard/guard/tree/hook

--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashmoran
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.