summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-07-12 14:52:19 -0500
committerGitHub <noreply@github.com>2016-07-12 14:52:19 -0500
commite5422e7a0073b5923fb12b270eb0cb907e91762f (patch)
treecfd9d1f48d6f87d3b8022208ecb8034b5e095b83 /spec/unit
parent77eb1c2dbb024ab93151f627af7f702474008259 (diff)
parent867a2ab48d5952261a9b1efea0f5f5dd331d4a97 (diff)
downloadchef-e5422e7a0073b5923fb12b270eb0cb907e91762f.tar.gz
Merge pull request #5103 from chef/lcg/fix-5012
add back method_missing support to set_unless
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/node_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index 4af5b11174..72731c927f 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -255,6 +255,12 @@ describe Chef::Node do
expect(node[:snoopy][:is_a_puppy]).to eq(true)
end
+ it "should allow you to set an attribute with set_unless with method_missing but emit a deprecation warning" do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ node.normal_unless.snoopy.is_a_puppy = false
+ expect(node[:snoopy][:is_a_puppy]).to eq(false)
+ end
+
it "should allow you to set an attribute with set_unless" do
node.normal_unless[:snoopy][:is_a_puppy] = false
expect(node[:snoopy][:is_a_puppy]).to eq(false)