开发者

Excluding a folder from autotesting

I've just installed a ZenTest to use autotest in my project. I use rspec and have an integration folder inside it. As I don't want all my integration tests run every single time I start autospec , so I'd like to somehow restrict autospec from running tests in that folder.

How do I exclude a chosen folder inside a /spec from runni开发者_C百科ng by autotest?


You can tell autotest to ignore folders by editing the .autotest file in the root of your project:

Autotest.add_hook :initialize do |at|
  %w{.git vendor spec/integration}.each {|exception| at.add_exception(exception)}
end

This example will ignore the .git, vendor, and spec/integration folders and their descendants. You'll need to restart autospec to make the changes effective.


Using autotest-rails (4.1.2) and ZenTest (~> 4.5) I noticed that some of my specs weren't being run - I had a vendors_controller and vendor model, and it started picking them up when I removed vendor from the exception list and went with vendor/plugin instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜