如何更改默认的“测试”使用 Ruby 自动测试中的文件夹
我的测试文件夹位于 lib/foo/test 而不是 /test 内。我如何告诉 Autotest 查看 lib/foo/test 来运行测试?我尝试在 .autotest 文件中添加一些带有映射的钩子,但没有成功。提前致谢。
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 but got no success. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很抱歉没有提供直接答案,但我自己已经停止使用自动测试并改用 Guard。 Guard 是一个普通的 Ruby 进程,位于 test::unit 或 rspec 之外,因此它的可配置性要高得多。
https://github.com/guard/guard
你想要的在 Guard 中很容易完成,只需编写项目根目录中的 Guardfile 并提及要监视的目录:
显然可以根据您的需要进一步定制它。
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:
obviously tailoring it further to your need.