5

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 running by autotest?

oldhomemovie
  • 14,621
  • 13
  • 64
  • 99

2 Answers2

6

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.

zetetic
  • 47,184
  • 10
  • 111
  • 119
0

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.

Steve
  • 836
  • 11
  • 14