2011-03-28 52 views

回答

1

找到你的黃瓜任務文件(cucumber.rake),並在rcov_opts什麼,你要要排除的文件編寫。例如:

Cucumber::Rake::Task.new({:ok => ['coverage_setup', 'db:test:prepare']}, 'Run features that should pass') do |t| 
t.binary = vendored_cucumber_bin 
t.fork = true 
t.profile = 'default' 
t.rcov = true 
t.rcov_opts = %w{--rails --aggregate coverage.data --exclude osx\/objc,gems\/,spec\/,\.bundler\/,features\/} 
end