diff options
author | Seth Vargo <sethvargo@gmail.com> | 2014-07-21 12:45:46 -0400 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-23 14:20:22 -0700 |
commit | acb572d390ebe47481745b5f22f7324bd4489bf3 (patch) | |
tree | 0cd82802cde6ebb322c6b4505db2582610f85cbd /spec/unit/lwrp_spec.rb | |
parent | 7062812caae5f0b465d6f43d776a2c473f61d67f (diff) | |
download | chef-acb572d390ebe47481745b5f22f7324bd4489bf3.tar.gz |
Allow an array in default_action
Diffstat (limited to 'spec/unit/lwrp_spec.rb')
-rw-r--r-- | spec/unit/lwrp_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb index 9a775f2dff..960aff3c36 100644 --- a/spec/unit/lwrp_spec.rb +++ b/spec/unit/lwrp_spec.rb @@ -180,6 +180,19 @@ describe "LWRP" do end end + describe "when #default_action is an array" do + let(:lwrp) do + Class.new(Chef::Resource::LWRPBase) do + actions :eat, :sleep + default_action [:eat, :sleep] + end + end + + it "returns the array of default actions" do + expect(lwrp.default_action).to eq([:eat, :sleep]) + end + end + describe "when inheriting from LWRPBase" do let(:parent) do Class.new(Chef::Resource::LWRPBase) do |