diff options
author | Thom May <thom@chef.io> | 2015-05-20 12:05:01 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2015-05-20 12:05:01 +0100 |
commit | b9b9a48f134834e9bcb8ff592258a4d1fdd6b691 (patch) | |
tree | c02db9f08e613b92adbd8f0bb582740636bab717 | |
parent | 7f0de95e21cdb92c37b431128c6548382375337a (diff) | |
parent | b84202402fe7e8a2409cc195ab6423bcba835d44 (diff) | |
download | chef-b9b9a48f134834e9bcb8ff592258a4d1fdd6b691.tar.gz |
Merge branch 'Kasen-master'
-rw-r--r-- | lib/chef/resource/lwrp_base.rb | 2 | ||||
-rw-r--r-- | spec/unit/lwrp_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb index 639399e6bb..a42261cfc4 100644 --- a/lib/chef/resource/lwrp_base.rb +++ b/lib/chef/resource/lwrp_base.rb @@ -106,7 +106,7 @@ class Chef else action = action_name.to_sym @actions.push(action) unless @actions.include?(action) - @default_action = action + @default_action = [action] end end diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb index f5b6f32ff2..e7f6769e51 100644 --- a/spec/unit/lwrp_spec.rb +++ b/spec/unit/lwrp_spec.rb @@ -185,7 +185,7 @@ describe "LWRP" do end it "should set the specified action as the default action" do - expect(get_lwrp(:lwrp_foo).new("blah").action).to eq(:pass_buck) + expect(get_lwrp(:lwrp_foo).new("blah").action).to eq([:pass_buck]) end it "should create a method for each attribute" do @@ -289,7 +289,7 @@ describe "LWRP" do end it "delegates #default_action to the parent" do - expect(child.default_action).to eq(:eat) + expect(child.default_action).to eq([:eat]) end end @@ -306,7 +306,7 @@ describe "LWRP" do end it "does not delegate #default_action to the parent" do - expect(child.default_action).to eq(:dont_eat) + expect(child.default_action).to eq([:dont_eat]) end end |