Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCov fails detecting coverage of RSpec 2 #89

Closed
torbjoernk opened this issue Jan 17, 2012 · 1 comment
Closed

RCov fails detecting coverage of RSpec 2 #89

torbjoernk opened this issue Jan 17, 2012 · 1 comment
Labels

Comments

@torbjoernk
Copy link

This issue is maybe somehow related to Issue #88.

Running this Rake task should generate the coverage report of my specs for RSpec:

desc "Run RCov to get coverage of Specs"
Rcov::RcovTask.new(:rcov_spec) do |t|
#   require 'rspec'
  t.pattern = 'spec/**/*_spec.rb'
  t.verbose = true
  t.rcov_opts << "--html"
  t.rcov_opts << "--text-summary"
  t.output_dir = "coverage/spec"
end

The report is generated, but somehow none of method bodies of my tested files in lib/*/ is marked as covered. (compare screenshot ). Only require, class definitions (class Xyz) and method definitions (def method_name) are marked as covered, though I'm 100% sure, some methods (not all) are being tested.


ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
rspec 2.8.0
rcov 0.9.11 2010-02-28
rake 0.9.2

@abedra
Copy link
Contributor

abedra commented Jan 17, 2012

I think RSpec has built in RCov tasks. I would try those and see if you get a proper result.

@abedra abedra closed this as completed Jan 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants