开发者

SimpleCov rspec and cucumber separately

开发者 https://www.devze.com 2023-01-16 13:14 出处:网络
Could you tell me how to setup simplecov to test models with rspec and controller with cucumber only?

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...


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

if RUBY_VERSION > "1.9"
  require 'simplecov'
  SimpleCov.start 'rails'
  SimpleCov.coverage_dir 'coverage/rspec'
end

inside of your test_helper, and

if RUBY_VERSION > "1.9"
  require 'simplecov'
  SimpleCov.start 'rails'
  SimpleCov.coverage_dir 'coverage/cucumber'
end

inside 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.


Hmmm... no answer.. my solution was to remove the require line from one of the test-frameworks and run the test separately...

0

精彩评论

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