I am using Rails 3, RSpec 2 and the rcov gem. I am running rcov on my specs 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
Firstly the view specs are not included in the results. How can I see code coverage for the views in the rcov results? Secondly, the code coverage for the models are quite low. When I look at the details it is because the comment lines are highlighted as not executed. How can I fix this? Lastly, it seems that most (if not all) of the method definitions are marked as not executed. Is there a way to correct this? Thanks, Daryn