1

I want to exclude files like on this picture below, so it not necessary include to test, so how to solve this problem?

image https://i.stack.imgur.com/n9Lwk.png

Dale Athanasias
  • 471
  • 3
  • 16
abah
  • 91
  • 1
  • 1
  • 7

2 Answers2

1

From that picture, I'm understanding you just want to exclude them from the coverage analysis?

If so, something like this might help:

http://psixty.wordpress.com/2010/06/22/how-to-exclude-files-in-rcova-code-coverage-tool-in-ruby/

oliverbarnes
  • 2,111
  • 1
  • 20
  • 31
1

Find your cucumber task file (cucumber.rake), and write on the rcov_opts what the files that you want to exclude. For example:

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
everyna
  • 71
  • 6