开发者

How to change the default 'test' folder in Autotest with Ruby

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜