diff options
| author | Serdar Sutay <serdar@opscode.com> | 2014-10-09 10:18:07 -0700 |
|---|---|---|
| committer | Serdar Sutay <serdar@opscode.com> | 2014-10-09 10:18:07 -0700 |
| commit | 94aedd4deecb55df5e7176f10cf1921099e343f5 (patch) | |
| tree | 5b0048a779bc8721c7ce4ac45f0ccc770dc6f53d /spec/unit/lwrp_spec.rb | |
| parent | d75c5b69de9ec183a0ba1c90c6dc5e3c58799301 (diff) | |
| download | chef-94aedd4deecb55df5e7176f10cf1921099e343f5.tar.gz | |
Revert "Remove appending :actions and :valid_actions"
This reverts commit 4aec038d42eae5c3c3bac50aa211d2b69cf54019.
Diffstat (limited to 'spec/unit/lwrp_spec.rb')
| -rw-r--r-- | spec/unit/lwrp_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb index 960aff3c36..bbc54645cf 100644 --- a/spec/unit/lwrp_spec.rb +++ b/spec/unit/lwrp_spec.rb @@ -231,6 +231,27 @@ describe "LWRP" do expect(child.default_action).to eq(:dont_eat) end end + + context "when actions are already defined" do + let(:child) do + Class.new(parent) do + actions :eat + actions :sleep + actions :drink + end + end + + def raise_if_deprecated! + if Chef::VERSION.split('.').first.to_i > 11 + raise "This test should be removed and the associated code should be removed!" + end + end + + it "ammends actions when they are already defined" do + raise_if_deprecated! + expect(child.actions).to eq([:eat, :sleep, :drink]) + end + end end end |
