Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/example/example_matcher.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/example_matcher.rb 43 35
53.49%
42.86%

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     class ExampleMatcher
4       def initialize(example_group_description, example_name)
5         @example_group_description = example_group_description
6         @example_name = example_name
7       end
8 
9       def matches?(specified_examples)
10         specified_examples.any? do |specified_example|
11           matches_literal_example?(specified_example) || matches_example_not_considering_modules?(specified_example)
12         end
13       end
14 
15       protected
16       def matches_literal_example?(specified_example)
17         specified_example =~ /(^#{example_group_regex} #{example_regexp}$|^#{example_group_regex}$|^#{example_group_with_before_all_regexp}$|^#{example_regexp}$)/
18       end
19 
20       def matches_example_not_considering_modules?(specified_example)
21         specified_example =~ /(^#{example_group_regex_not_considering_modules} #{example_regexp}$|^#{example_group_regex_not_considering_modules}$|^#{example_regexp}$)/
22       end
23 
24       def example_group_regex
25         Regexp.escape(@example_group_description)
26       end
27 
28       def example_group_with_before_all_regexp
29         Regexp.escape("#{@example_group_description} before(:all)")
30       end
31 
32       def example_group_regex_not_considering_modules
33         Regexp.escape(@example_group_description.split('::').last)
34       end
35 
36       def example_regexp
37         Regexp.escape(@example_name) if @example_name
38       end
39     end
40 
41     ExampleGroupMethods.matcher_class = ExampleMatcher
42   end
43 end

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