[rspec-users] RCov results seem to include the spec files
pergesu at gmail.com
Mon Apr 9 01:37:55 EDT 2007
I saw the RCov page at http://rspec.rubyforge.org/tools/rcov.html and
decided to add it to my project. My rakefile looks like this:
desc "Run all specs with RCov"
Spec::Rake::SpecTask.new("spec:rcov") do |t|
t.spec_files = FileList["spec/**/*_spec.rb"]
t.rcov = true
When I run rake spec:rcov, it runs the specs using RCov and generates
the reports, but it's including all my spec files as well.
At the very bottom I'll see stuff like
spec/models/user_spec.rb 89 73 100.0%
it even includes spec_helper.rb!
I don't really care to know that my specs are covered :)
Here's the command that's being run as a result of the rake task:
-I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" -S rcov
--exclude lib\/spec,bin\/spec,config\/boot.rb -o "coverage"
rspec 0.8.2, rcov 0.8.0.2
I noticed that the example output at
http://rspec.rubyforge.org/coverage/index.html doesn't seem to share
this. So how can I make rcov ignore the spec files themselves?
More information about the rspec-users