summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2015-06-29 11:06:39 -0700
committerNoah Kantrowitz <noah@coderanger.net>2015-06-29 11:06:39 -0700
commit91b1de7ef374022764eb30e61a92741af572ab37 (patch)
treef7abd84b1d912e5ddc0883de149dec5997e470f2
parenta607109dd188ebbb762b3b2c38c588101765f493 (diff)
downloadchef-91b1de7ef374022764eb30e61a92741af572ab37.tar.gz
Add a test for array assignment on action.
-rw-r--r--spec/unit/resource_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index fad68552b7..353c5ec129 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -1020,6 +1020,11 @@ describe Chef::Resource do
it { is_expected.to eq [:one] }
end
+ context "with an array assignment" do
+ before { resource.action = [:two, :one] }
+ it { is_expected.to eq [:two, :one] }
+ end
+
context "with an invalid action" do
it { expect { resource.action(:three) }.to raise_error Chef::Exceptions::ValidationFailed }
end