summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-07-11 13:52:57 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-07-11 13:52:57 -0700
commitc603f1b0dba5024485b9b6c53c16dab38d9029f1 (patch)
tree30ae803321154a1cf1280787f7a1c1ad94565d08 /spec
parentdfe3498c68da48362b6bf8d558ecd3386702cd45 (diff)
downloadchef-c603f1b0dba5024485b9b6c53c16dab38d9029f1.tar.gz
add back method_missing support to set_unless
closes #5012
Diffstat (limited to 'spec')
-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 af9a6e94fc..6f43c56535 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -256,6 +256,12 @@ describe Chef::Node do
end
it "should allow you to set an attribute with set_unless" 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 with method_missing but emit a deprecation warning" do
node.normal_unless[:snoopy][:is_a_puppy] = false
expect(node[:snoopy][:is_a_puppy]).to eq(false)
end