Geminstaller C0 Coverage Information - RCov

spec/fixture/rubygems_dist/rubygems-trunk/lib/rubygems/errors.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/fixture/rubygems_dist/rubygems-trunk/lib/rubygems/errors.rb 35 22
71.43%
63.64%

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 class Gem::ErrorReason; end
2 
3 # Generated when trying to lookup a gem to indicate that the gem
4 # was found, but that it isn't usable on the current platform.
5 #
6 # fetch and install read these and report them to the user to aid
7 # in figuring out why a gem couldn't be installed.
8 #
9 class Gem::PlatformMismatch < Gem::ErrorReason
10 
11   attr_reader :name
12   attr_reader :version
13   attr_reader :platforms
14 
15   def initialize(name, version)
16     @name = name
17     @version = version
18     @platforms = []
19   end
20 
21   def add_platform(platform)
22     @platforms << platform
23   end
24 
25   def wordy
26     prefix = "Found #{@name} (#{@version})"
27 
28     if @platforms.size == 1
29       "#{prefix}, but was for platform #{@platforms[0]}"
30     else
31       "#{prefix}, but was for platforms #{@platforms.join(' ,')}"
32     end
33   end
34 
35 end

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