diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-04 14:46:21 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-04 14:47:06 -0700 |
| commit | 0950d09d12ec06e97915d264e8724e736c84e36a (patch) | |
| tree | ded36b42808ab9a214830af0d10a2b365b8f4734 /spec | |
| parent | a2537dc52724386b8f05240e9b18bff437141e79 (diff) | |
(#6949) Fix passing positional arguments to actions.
We had a logic failure that didn't pass positional arguments at all, but which
our testing didn't verify. This entirely broke things. Now fixed, and a test
added to ensure we don't bug out further...
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/application/string_base_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/application/string_base_spec.rb b/spec/unit/application/string_base_spec.rb index 753d911d1..cd24b6c49 100755 --- a/spec/unit/application/string_base_spec.rb +++ b/spec/unit/application/string_base_spec.rb @@ -127,6 +127,12 @@ describe Puppet::Application::StringBase do app.preinit and app.parse_options and app.setup app.arguments.should == [{ :mandatory => "--bar" }] end + + it "should pass positional arguments" do + app.command_line.stubs(:args).returns %w{--mandatory --bar foo bar baz quux} + app.preinit and app.parse_options and app.setup + app.arguments.should == ['bar', 'baz', 'quux', { :mandatory => "--bar" }] + end end describe "#main" do |
