Geminstaller C0 Coverage Information - RCov

spec/functional/rogue_gem_finder_spec.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/functional/rogue_gem_finder_spec.rb 40 28
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 "an RogueGemFinder instance" do
5   before(:each) do
6     GemInstaller::TestGemHome.use
7     @registry = GemInstaller::create_registry
8     @rogue_gem_finder = @registry.rogue_gem_finder
9     @gem_command_manager = @registry.gem_command_manager
10     @rogue_gem = sample_gem
11     @legit_gem = sample_dependent_multiplatform_gem
12     @legit_gem.install_options << "--include-dependencies"
13     
14     @mock_output_proxy = mock("Mock OutputProxy")
15     @rogue_gem_finder.output_proxy = @mock_output_proxy
16   end
17 
18   # This is a hack to make the suite pass under Rubygems <= 1.3.0 (maybe < 1.3.0?)
19   # See http://thewoolleyweb.lighthouseapp.com/projects/11580-geminstaller/tickets/38-test-failures-under-older-rubygems-due-to-invalid-spec-warnings
20   if GemInstaller::RubyGemsVersionChecker.matches?('> 1.3.0')
21   it "should return yaml for all locally installed gems which are not matched by one of the config gems passed in" do
22     @gem_command_manager.install_gem(@rogue_gem)
23     # legit gem will also install a dependency, which should be detected as a valid gem in the config,
24     # since it's parent is in the config
25     @gem_command_manager.install_gem(@legit_gem)
26 
27     @mock_output_proxy.should_receive(:sysout)
28     
29     config_file_paths = []
30     
31     output = @rogue_gem_finder.print_rogue_gems([@legit_gem], config_file_paths)
32     
33     output.should match(/#{@rogue_gem.name}/)
34   end
35   end
36 
37   after(:each) do
38     GemInstaller::TestGemHome.uninstall_all_test_gems
39   end
40 end

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