开发者

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

开发者 https://www.devze.com 2023-04-04 02:48 出处:网络
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开发者_Stac

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

精彩评论

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

关注公众号