With defaults, RCov doesn't work the way you how you would like it to. To create a nice test coverage report, copy the attached file to lib/tasks/rcov.rake
. After that rake rcov:all
will run all RSpec examples and Cucumber features. The report will be written RAILS_ROOT/coverage/index.html
.
Here is what the task does in detail:
app/**/*.rb
and nothing elseIGNORE_SHARED_TRAITS=true
it ignores
Modularity
Show archive.org snapshot
traits in app/controllers/shared
and app/models/shared
(which may or may not be entirely correct for your case).