I am adding a directory for services classes in my rails application: app/services
I would like to add specs for these classes in the directory: spec/services
I added a spec to spec/services, but running autospec does not run the example.
Is there a way to configure autospec to run examples in new directories?
Thanks.
I believe I have found the answer to my question. I added a file ".autotest" to the root of my project with the following content:
Autotest.add_hook :initialize do |at|
at.add_mapping(%r%^spec/services/.*_spec\.rb$%) do
at.files_matching(%r%^spec/services/.*_spec\.rb$%)
end
end