My test folder is inside lib/foo/test instead of /test. How can I tell Autotest to look at lib/foo/test for the tests to run? I tried to add some hooks with mappings in the .autotest file b开发者_StackOverflow中文版ut got no success. Thanks in advance.
I'm sorry for not providing a direct answer, but I've stopped using Autotest myself and switched to Guard. Guard is a plain Ruby process that sits outside test::unit or rspec and as such it's much more configurable.
https://github.com/guard/guard
What you want is easy to accomplish in Guard, just write a Guardfile in the project root and mention the directory to watch:
watch("lib/foo/test") { |m| "test/lib/foo/test/#{m[1]}_test.rb" }
obviously tailoring it further to your need.
精彩评论