Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/matchers/satisfy.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/satisfy.rb 47 23
68.09%
34.78%

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     
4     class Satisfy #:nodoc:
5       def initialize(&block)
6         @block = block
7       end
8       
9       def matches?(actual, &block)
10         @block = block if block
11         @actual = actual
12         @block.call(actual)
13       end
14       
15       def failure_message_for_should
16         "expected #{@actual} to satisfy block"
17       end
18 
19       def failure_message_for_should_not
20         "expected #{@actual} not to satisfy block"
21       end
22     end
23     
24     # :call-seq:
25     #   should satisfy {}
26     #   should_not satisfy {}
27     #
28     # Passes if the submitted block returns true. Yields target to the
29     # block.
30     #
31     # Generally speaking, this should be thought of as a last resort when
32     # you can't find any other way to specify the behaviour you wish to
33     # specify.
34     #
35     # If you do find yourself in such a situation, you could always write
36     # a custom matcher, which would likely make your specs more expressive.
37     #
38     # == Examples
39     #
40     #   5.should satisfy { |n|
41     #     n > 3
42     #   }
43     def satisfy(&block)
44       Matchers::Satisfy.new(&block)
45     end
46   end
47 end

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