I use Rails 3, RSpec 2 and the rcov gem. I run rcov in my specifications with the following rake task:
desc "Run all specs with rcov"
RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
t.rcov = true
t.pattern = "./spec/**/*_spec.rb"
t.rcov_opts = %w{--rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/}
end
First, view specifications are not included in the results. How can I see code coverage of views in rcov results? Secondly, the code coverage for the models is pretty low. When I look at the details, this is because the comment lines are highlighted as not completed. How can i fix this? Finally, it seems that most (if not all) method definitions are marked as not implemented. Is there any way to fix this? Thanks Darin
Daryn source
share