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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
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!



This topic is locked and can not be replied to.