I want to exclude files like on this picture below, so it not necessary include to test, so how to solve this problem?
Asked
Active
Viewed 1,185 times
1
-
How do you run your tests (rake task, command line tool)? Do you use rspec/cucumber/test-unit? – Pan Thomakos Mar 28 '11 at 20:50
-
hi pan I used "rake cucumber". thanks – abah Mar 29 '11 at 03:24
2 Answers
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