summaryrefslogtreecommitdiff
path: root/spec/unit/property_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-04 08:35:26 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-23 15:23:02 -0700
commit1d96b8c7bb96a476625a026bea58dd0f251af716 (patch)
tree4b68570dbb87c4b0cfca2e3a9f30bf3fd3d7e1db /spec/unit/property_spec.rb
parentd91ed1d763aa35b29d22d712077bc965ce7098b2 (diff)
downloadchef-1d96b8c7bb96a476625a026bea58dd0f251af716.tar.gz
Allow values to be set to nil (override defaults) if user allows it
Diffstat (limited to 'spec/unit/property_spec.rb')
-rw-r--r--spec/unit/property_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index d9fc4fa41f..ff5e135c78 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -76,12 +76,13 @@ describe "Chef::Resource.property" do
expect(resource.bare_property).to eq 10
end
# it "emits a deprecation warning and does a get, if set to nil" do
- # expect(resource.bare_property 10).to eq 10
- # expect { resource.bare_property nil }.to raise_error Chef::Exceptions::DeprecatedFeatureError
- # Chef::Config[:treat_deprecation_warnings_as_errors] = false
- # expect(resource.bare_property nil).to eq 10
- # expect(resource.bare_property).to eq 10
- # end
+ it "emits a deprecation warning and does a get, if set to nil" do
+ expect(resource.bare_property 10).to eq 10
+ # expect { resource.bare_property nil }.to raise_error Chef::Exceptions::DeprecatedFeatureError
+ # Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ expect(resource.bare_property nil).to eq 10
+ expect(resource.bare_property).to eq 10
+ end
it "can be updated" do
expect(resource.bare_property 10).to eq 10
expect(resource.bare_property 20).to eq 20