diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-09 12:28:52 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-09 12:28:52 -0700 |
commit | 34221471b5e9924ed7dd7915170245a081c9b71f (patch) | |
tree | 6b283949f1039e2c9f0b5afb477a71499844c81a /spec/unit/lwrp_spec.rb | |
parent | 5a30432e811ca53e5b94bafb0145d5cadb4f4573 (diff) | |
parent | 02a8fe0725c50d2526251fcb281aae65a84c5da5 (diff) | |
download | chef-34221471b5e9924ed7dd7915170245a081c9b71f.tar.gz |
Merge pull request #2197 from opscode/sersut/fixup-chef-1662
Keep deprecation of valid_actions until Chef 13.
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 28d32d71ba..452e1da2a4 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 > 12 + 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 |