Geminstaller C0 Coverage Information - RCov

spec/unit/gem_list_checker_spec.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/unit/gem_list_checker_spec.rb 22 18
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 "a GemListChecker instance with mock dependencies" do
5   before(:each) do
6     @mock_gem_command_manager = mock("Mock GemCommandManager")
7     @mock_gem_arg_processor = mock("Mock GemArgProcessor")
8     @gem_list_checker = GemInstaller::GemListChecker.new
9     @gem_list_checker.gem_command_manager = @mock_gem_command_manager
10     @gem_list_checker.gem_arg_processor = @mock_gem_arg_processor
11     @sample_gem = sample_gem
12   end
13 
14   it "should raise exception for unexpected case of multiple matches in list" do
15     @mock_gem_arg_processor.should_receive(:strip_non_common_gem_args)
16     stub_remote_list = ['stubgem (1.0.0)', 'stubgem (unexpected_version)']
17     @mock_gem_command_manager.should_receive(:list_remote_gem).and_return(stub_remote_list)
18     
19     lambda{ @gem_list_checker.find_remote_matching_gem(@sample_gem) }.should raise_error(GemInstaller::GemInstallerError)
20   end
21 end
22 

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