diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-29 12:18:12 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-29 12:25:46 -0700 |
| commit | 207deae2dc06ca439e3b5ee9b044221a1c2899bb (patch) | |
| tree | 3dcbc0c601dd7757fb0a865cc222ac97ded8b0d2 /spec/shared_behaviours | |
| parent | 1aaf5fdc51e165c7d0f377450016cd4fb3767c02 (diff) | |
| download | puppet-207deae2dc06ca439e3b5ee9b044221a1c2899bb.tar.gz puppet-207deae2dc06ca439e3b5ee9b044221a1c2899bb.tar.xz puppet-207deae2dc06ca439e3b5ee9b044221a1c2899bb.zip | |
(#7289) Specify order for option decorations.
`before_action` decorations should always resolve in resolution order
from most general (inherited from furthest away) to most specific
(declared on the instance), and should always execute Face-level
option decorations before action-level option decorations.
`after_action` decorations should execute in the opposite order.
Reviewed-By: Daniel Pittman
Diffstat (limited to 'spec/shared_behaviours')
| -rwxr-xr-x | spec/shared_behaviours/things_that_declare_options.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/shared_behaviours/things_that_declare_options.rb b/spec/shared_behaviours/things_that_declare_options.rb index 5300a159a..4ffe55d07 100755 --- a/spec/shared_behaviours/things_that_declare_options.rb +++ b/spec/shared_behaviours/things_that_declare_options.rb @@ -37,9 +37,12 @@ shared_examples_for "things that declare options" do it "should list all the options" do thing = add_options_to do option "--foo" - option "--bar" + option "--bar", '-b' + option "-q", "--quux" + option "-f" + option "--baz" end - thing.options.should =~ [:foo, :bar] + thing.options.should == [:foo, :bar, :b, :q, :quux, :f, :baz] end it "should detect conflicts in long options" do |
