How can I get autotest to keep running my specs after failures without stopping?

217 views Asked by At

This seems like a very bizarre problem and believe me I've done a lot of searching before posing the question here. I am using the latest version of Rails 3 and Rspec 2 with Ruby 1.9.2, and I can't get autotest to run my specs properly when they fail.

When all of my specs pass, it works great; as soon as I make a change, the specs re-run and all is well.

When I have a spec failure, autotest halts instead of waiting for me to make another change. So it sort of defeats the whole purpose of autotest - my tests go red and I don't get to make them green again unless I manually run autotest again.

2

There are 2 answers

1
karthiks On

may you look at the link http://ph7spot.com/musings/getting-started-with-autotest to ensure that you have not missed something.

0
tal On

You can use :

find . -cmin -1

to check what changed in the last minute, or run

autotest -v

to have the log of what triggering the rerun.

After that, just ignore the offensive files by editing the .autotest file in the root of your project, for example :

Autotest.add_hook :initialize do |autotest|
  %w{.git .svn .hg .DS_Store ._* vendor tmp log doc solr}.each do |exception|
    autotest.add_exception(exception)
  end
end