diff options
author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-26 16:34:25 -0700 |
---|---|---|
committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-26 16:47:38 -0700 |
commit | c627fad08c4866fbef300e887750c29963985635 (patch) | |
tree | 4f0d014d232a2eec850b704c177b31f4b879e95e /spec | |
parent | cd035426848154e8d11db5c59657d1b74258c9a0 (diff) | |
download | puppet-c627fad08c4866fbef300e887750c29963985635.tar.gz puppet-c627fad08c4866fbef300e887750c29963985635.tar.xz puppet-c627fad08c4866fbef300e887750c29963985635.zip |
(#7251) Let exceptions raised in decorators rise.
This allows users to write before_action advice that does basic
option validation very easily.
Reviewed-By: Daniel Pittman
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/interface/action_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb index 24826a6ef..23d0de490 100755 --- a/spec/unit/interface/action_spec.rb +++ b/spec/unit/interface/action_spec.rb @@ -237,7 +237,7 @@ describe Puppet::Interface::Action do when_invoked { } end end - expect { face.bar }.to raise_error ArgumentError, /missing required options \(foo\)/ + expect { face.bar }.to raise_error ArgumentError, /The following options are required: foo/ end it "should fail when a required face option is not provided" do @@ -245,7 +245,7 @@ describe Puppet::Interface::Action do option('--foo') { required } action(:bar) { when_invoked { } } end - expect { face.bar }.to raise_error ArgumentError, /missing required options \(foo\)/ + expect { face.bar }.to raise_error ArgumentError, /The following options are required: foo/ end end |