开发者

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

开发者 https://www.devze.com 2023-02-08 13:01 出处:网络
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 g

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; a开发者_如何学JAVAs 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.


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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号