从自动测试中排除文件夹
我刚刚安装了 ZenTest 以在我的项目中使用自动测试。我使用 rspec
并在其中有一个 integration
文件夹。由于我不希望每次启动 autospec 时都运行所有集成测试,因此我想以某种方式限制 autospec 在该文件夹中运行测试。
如何通过自动测试排除 /spec 中选定的文件夹运行?
I've just installed a ZenTest to use autotest in my project. I use rspec
and have an integration
folder inside it. As I don't want all my integration tests run every single time I start autospec , so I'd like to somehow restrict autospec from running tests in that folder.
How do I exclude a chosen folder inside a /spec from running by autotest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 autotest-rails (4.1.2) 和 ZenTest (~> 4.5),我注意到我的一些规范没有运行 - 我有一个 sellers_controller 和供应商模型,当我从供应商中删除供应商时,它开始拾取它们例外列表并与供应商/插件一起使用。
Using autotest-rails (4.1.2) and ZenTest (~> 4.5) I noticed that some of my specs weren't being run - I had a vendors_controller and vendor model, and it started picking them up when I removed vendor from the exception list and went with vendor/plugin instead.
您可以通过编辑项目根目录中的
.autotest
文件来告诉 autotest 忽略文件夹:此示例将忽略
.git
、vendor
和spec/integration
文件夹及其后代。您需要重新启动autospec
才能使更改生效。You can tell autotest to ignore folders by editing the
.autotest
file in the root of your project:This example will ignore the
.git
,vendor
, andspec/integration
folders and their descendants. You'll need to restartautospec
to make the changes effective.