Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/example/predicate_matchers.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/example/predicate_matchers.rb 46 16
80.43%
50.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 Example
3     module PredicateMatchers
4       # :call-seq:
5       #   predicate_matchers[matcher_name] = method_on_object
6       #   predicate_matchers[matcher_name] = [method1_on_object, method2_on_object]
7       #
8       # Dynamically generates a custom matcher that will match
9       # a predicate on your class. RSpec provides a couple of these
10       # out of the box:
11       #
12       #   exist (for state expectations)
13       #     File.should exist("path/to/file")
14       #
15       #   an_instance_of (for mock argument matchers)
16       #     mock.should_receive(:message).with(an_instance_of(String))
17       #
18       # == Examples
19       #
20       #   class Fish
21       #     def can_swim?
22       #       true
23       #     end
24       #   end
25       #
26       #   describe Fish do
27       #     predicate_matchers[:swim] = :can_swim?
28       #     it "should swim" do
29       #       Fish.new.should swim
30       #     end
31       #   end
32       def predicate_matchers
33         @predicate_matchers ||= Spec::HashWithDeprecationNotice.new("predicate_matchers", "the new Matcher DSL")
34       end
35 
36       def define_methods_from_predicate_matchers # :nodoc:
37         predicate_matchers.each_pair do |matcher_method, method_on_object|
38           define_method matcher_method do |*args|
39             eval("be_#{method_on_object.to_s.gsub('?','')}(*args)")
40           end
41         end
42       end
43 
44     end
45   end
46 end

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