Rspec Steps C0 Coverage Information - RCov

rcov/ruby/1.8/gems/rspec-core-2.5.1/lib/rspec/core/formatters/helpers.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
rcov/ruby/1.8/gems/rspec-core-2.5.1/lib/rspec/core/formatters/helpers.rb 28 19
100.00%
100.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 RSpec
2 
3   module Core
4 
5     module Formatters
6 
7       module Helpers
8         SUB_SECOND_PRECISION = 5
9         DEFAULT_PRECISION = 2
10 
11         def format_seconds(float)
12           precision ||= (float < 1) ? SUB_SECOND_PRECISION : DEFAULT_PRECISION
13           formatted = sprintf("%.#{precision}f", float)
14           strip_trailing_zeroes(formatted)
15         end
16 
17         def strip_trailing_zeroes(string)
18           stripped = string.sub(/[^1-9]+$/, '')
19           stripped.empty? ? "0" : stripped
20         end
21 
22       end
23 
24     end
25 
26   end
27 
28 end

Generated on Fri Apr 22 17:22:42 -0700 2011 with rcov 0.9.8