Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/matchers/pretty.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/pretty.rb 37 35
21.62%
17.14%

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     module Pretty
4       def split_words(sym)
5         sym.to_s.gsub(/_/,' ')
6       end
7 
8       def to_sentence(words)
9         words = words.map{|w| w.inspect}
10         case words.length
11           when 0
12             ""
13           when 1
14             " #{words[0]}"
15           when 2
16             " #{words[0]} and #{words[1]}"
17           else
18             " #{words[0...-1].join(', ')}, and #{words[-1]}"
19         end
20       end
21 
22       def _pretty_print(array)
23         result = ""
24         array.each_with_index do |item, index|
25           if index < (array.length - 2)
26             result << "#{item.inspect}, "
27           elsif index < (array.length - 1)
28             result << "#{item.inspect} and "
29           else
30             result << "#{item.inspect}"
31           end
32         end
33         result
34       end
35     end
36   end
37 end

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