From 61cf97c3fcfb072bdb0d54cd71de0bdb2f482bd0 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Thu, 5 Dec 2013 09:54:20 -0800 Subject: Add cli_arguments--remaining arguments after stripping CLI options --- spec/mixlib/cli_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/mixlib/cli_spec.rb b/spec/mixlib/cli_spec.rb index 39740b4..685af4e 100644 --- a/spec/mixlib/cli_spec.rb +++ b/spec/mixlib/cli_spec.rb @@ -206,10 +206,11 @@ describe Mixlib::CLI do ARGV.replace argv_old end - it "should return any un-parsed elements" do + it "should preserve and return any un-parsed elements" do TestCLI.option(:party, :short => "-p LOCATION") @cli = TestCLI.new - @cli.parse_options([ '-p', 'opscode', 'hard' ]).should == ['hard'] + @cli.parse_options([ 'easy', '-p', 'opscode', 'hard' ]).should == ['easy', 'hard'] + @cli.cli_arguments.should == ['easy', 'hard'] end end end -- cgit v1.2.1