Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/matchers/be_close.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/be_close.rb 32 20
37.50%
15.00%

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     # :call-seq:
4     #   should be_close(expected, delta)
5     #   should_not be_close(expected, delta)
6     #
7     # Passes if actual == expected +/- delta
8     #
9     # == Example
10     #
11     #   result.should be_close(3.0, 0.5)
12     def be_close(expected, delta)
13       Matcher.new :be_close, expected, delta do |_expected_, _delta_|
14         match do |actual|
15           (actual - _expected_).abs < _delta_
16         end
17 
18         failure_message_for_should do |actual|
19           "expected #{_expected_} +/- (< #{_delta_}), got #{actual}"
20         end
21 
22         failure_message_for_should_not do |actual|
23           "expected #{_expected_} +/- (< #{_delta_}), got #{actual}"
24         end
25 
26         description do
27           "be close to #{_expected_} (within +- #{_delta_})"
28         end
29       end
30     end
31   end
32 end

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