Geminstaller C0 Coverage Information - RCov

spec/unit/rubygems_version_warnings_spec.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/unit/rubygems_version_warnings_spec.rb 28 22
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 dir = File.dirname(__FILE__)
2 require File.expand_path("#{dir}/../helper/spec_helper")
3 
4 describe "RubyGems version warnings class" do
5   before(:each) do
6     @warnings_class = GemInstaller::RubyGemsVersionWarnings
7     @warnings_class.should_receive(:allow_unsupported?).any_number_of_times.and_return(false)
8   end
9   
10   it "warns properly if outdated" do
11     @warnings_class.outdated_warning(:rubygems_version => '0.9.4').should match(/should update/m)
12   end
13 
14   it "does not warn if not outdated" do
15     @warnings_class.outdated_warning(:rubygems_version => '1.0.1').should be_nil
16   end
17 
18   it "warns properly if incompatible" do
19     @warnings_class.incompatible_warning(:rubygems_version => '0.9.5').should match(/compatibility/m)
20     @warnings_class.incompatible_warning(:rubygems_version => '1.1.0').should match(/bugs/m)
21   end
22 
23   it "does not warn if compatible" do
24     @warnings_class.incompatible_warning(:rubygems_version => '1.0.1').should be_nil
25     @warnings_class.incompatible_warning(:rubygems_version => '1.1.1').should be_nil
26   end
27 
28 end

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