Geminstaller C0 Coverage Information - RCov

spec/unit/gem_arg_processor_spec.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/unit/gem_arg_processor_spec.rb 31 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 "a GemArgProcessor instance" do
5   before(:each) do
6     @gem_arg_processor = GemInstaller::GemArgProcessor.new
7   end
8 
9   it "can strip all non-common args from an args array for options without a parameter" do
10     args = GemInstaller::GemArgProcessor::GEM_COMMON_OPTIONS_WITHOUT_ARG.dup
11     processed_args = @gem_arg_processor.strip_non_common_gem_args(args)
12     processed_args.should==(args)
13     
14     args_with_invalid = args.dup
15     args_with_invalid << "-pinvalid"
16     args_with_invalid << "--debuginvalid"
17     processed_args = @gem_arg_processor.strip_non_common_gem_args(args)
18     processed_args.should==(args)
19   end
20 
21   it "can strip all non-common args from an args array for options with a parameter" do
22     # args = ['--source','http://foo.bar','--http_proxy','myproxy','--config-file','myconfig']
23     # processed_args = @gem_arg_processor.strip_non_common_gem_args(args)
24     # processed_args.should==(args)
25 
26     args = ['--source=http://foo.bar','--http_proxy=myproxy','--config-file=myconfig']
27     processed_args = @gem_arg_processor.strip_non_common_gem_args(args)
28     processed_args.should==(args)
29   end
30 end
31 

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