Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/expectations/handler.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/expectations/handler.rb 50 41
46.00%
43.90%

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 Expectations
3     class InvalidMatcherError < ArgumentError; end        
4     
5     class PositiveExpectationHandler        
6       def self.handle_matcher(actual, matcher, message=nil, &block)
7         ::Spec::Matchers.last_should = :should
8         ::Spec::Matchers.last_matcher = matcher
9         return ::Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?
10 
11         match = matcher.matches?(actual, &block)
12         return match if match
13         
14         message ||= matcher.respond_to?(:failure_message_for_should) ?
15                     matcher.failure_message_for_should :
16                     matcher.failure_message
17         
18         if matcher.respond_to?(:diffable?) && matcher.diffable?
19           ::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
20         else
21           ::Spec::Expectations.fail_with message
22         end
23       end
24     end
25 
26     class NegativeExpectationHandler
27       def self.handle_matcher(actual, matcher, message=nil, &block)
28         ::Spec::Matchers.last_should = :should_not
29         ::Spec::Matchers.last_matcher = matcher
30         return ::Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
31         
32         match = matcher.respond_to?(:does_not_match?) ?
33                 !matcher.does_not_match?(actual, &block) :
34                 matcher.matches?(actual, &block)
35         return match unless match
36         
37         message ||= matcher.respond_to?(:failure_message_for_should_not) ?
38                     matcher.failure_message_for_should_not :
39                     matcher.negative_failure_message
40 
41         if matcher.respond_to?(:diffable?) && matcher.diffable?
42           ::Spec::Expectations.fail_with message, matcher.expected.first, matcher.actual
43         else
44           ::Spec::Expectations.fail_with message
45         end
46       end
47     end
48   end
49 end
50 

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