Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/matchers/generated_descriptions.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/matchers/generated_descriptions.rb 36 27
38.89%
33.33%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 module Spec
2   module Matchers
3     class << self
4       attr_accessor :last_matcher, :last_should # :nodoc:
5     end
6 
7     def self.clear_generated_description
8       self.last_matcher = nil
9       self.last_should = nil
10     end
11 
12     def self.generated_description
13       return nil if last_should.nil?
14       "#{last_should.to_s.gsub('_',' ')} #{last_description}"
15     end
16     
17   private
18     
19     def self.last_description
20       last_matcher.respond_to?(:description) ? last_matcher.description : <<-MESSAGE
21 When you call a matcher in an example without a String, like this:
22 
23 specify { object.should matcher }
24 
25 or this:
26 
27 it { should matcher }
28 
29 RSpec expects the matcher to have a #description method. You should either
30 add a String to the example this matcher is being used in, or give it a
31 description method. Then you won't have to suffer this lengthy warning again.
32 MESSAGE
33     end
34   end
35 end
36       

Generated on Mon May 10 23:40:27 -0700 2010 with rcov 0.9.8