A Place for my head

On Ruby, Rails, Concurrency and fiction

Archive for January 25th, 2009

Posted in : rails,ruby | 1 comment

Stuff floating on intrawebs for adding more files to be ignored using “add_exception” may not work because by the time “run” hook gets a chance to run, files to be ignored regexp is already compiled. The alternative is to use “initialize” hook like this:

1
2
3
Autotest.add_hook :initialize do |at|
  at.add_exception(/^(coverage|\.git)/)
end

This is with 3.11.0 of ZenTest and YMMV.