Folder exclusion from autotest

I just installed ZenTest to use autotest in my project. I use rspec and have an integration folder inside it. Since I do not want all my integration tests to run every time I run autospec, so I would like to somehow limit autospec from running tests in this folder.

How can I exclude the selected folder inside / spec from autotest?

+4
source share
2 answers

You can tell the 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 

In this example, the .git , vendor and spec/integration folders and their descendants will be ignored. You need to restart autospec to make the changes effective.

+6
source

Using autotest-rails (4.1.2) and ZenTest (~> 4.5), I noticed that some of my specifications were not fulfilled - I had a vendors_controller and vendor model, and it started collecting them when I removed the provider from the exception list and went with the provider / plugin.

0
source

Source: https://habr.com/ru/post/1307661/


All Articles