SimpleCov rspec 和 cucumber 分别
你能告诉我如何设置 simplecov 来测试带有 rspec 的模型和仅带有黄瓜的控制器吗? 我不喜欢 rspec 和黄瓜覆盖率混合在一起......
Could you tell me how to setup simplecov to test models with rspec and controller with cucumber only?
I don't like it that rspec and cucumber coverage are mixed together...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SimpleCov.coverage_dir 'coverage'
这将允许您设置覆盖率信息所在的目录。因此,配置它的一种方法是将它们放在
test_helper
内部,并放在
features/support/env.rb
内部,这应该将它们分开。您可能还想确保单独运行测试,这样就不会合并它们。
SimpleCov.coverage_dir ‘coverage’
This will allow you to set the directory where the coverage information will go. So one way to configure it will be to put
inside of your
test_helper
, andinside of
features/support/env.rb
That should separate them. You probably also want to make sure to run the tests separately so that it doesn't merge them.
嗯...没有答案..我的解决方案是从测试框架之一中删除 require 行并单独运行测试...
Hmmm... no answer.. my solution was to remove the require line from one of the test-frameworks and run the test separately...