This post originated from an RSS feed registered with Ruby Buzz
by Ryan Davis.
Original Post: autotest freaking out? Try -v and nuke the extras
Feed Title: Polishing Ruby
Feed URL: http://blog.zenspider.com/index.rdf
Feed Description: Musings on Ruby and the Ruby Community...
"The root cause is that I have "require 'turn'" in my project (which provides prettier Test::Unit output) but Autotest::handleresults isn't designed to parse turn's output."_
This was an advanced issue caused by turn (I do hope he files a bug against turn), and solved simply be removing it.
I've seen much simpler issues that can be nearly as confusing. For example, several projects I've worked on that generated thumbnails or index files in RAILS_ROOT, triggering autotest to rerun. This can be confusing, but there is an easy way to figure this stuff out. Run autotest -v and it'll tell you what file changes it detected before rerunning... Then it is a matter of changing your code or adding a .autotest like so:
Autotest.add_hook :run do |at|
at.exceptions = /^(?:\.\/)?(?:db|doc|log|public|script|tmp|filestore|vendor\/r
ails)|\.svn|(?:.*_flymake\.rb$)/
end
Ugly... I know. I'll come up with a more flexible means of adding a single exclusion.