summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-12-05 09:54:20 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-12-05 09:54:20 -0800
commit61cf97c3fcfb072bdb0d54cd71de0bdb2f482bd0 (patch)
treee46c6962a95a52104b33f87ded6246bd26fbe798 /spec
parent7a7271a72a857b500c06ee0034ec93b74dba69b0 (diff)
downloadmixlib-cli-61cf97c3fcfb072bdb0d54cd71de0bdb2f482bd0.tar.gz
Add cli_arguments--remaining arguments after stripping CLI optionsjk/preserve-name-args
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/cli_spec.rb5
1 files changed, 3 insertions, 2 deletions
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