diff options
author | John Keiser <john@johnkeiser.com> | 2015-06-04 10:11:25 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-06-23 15:23:02 -0700 |
commit | 6e4783f4e71681c7a6fefedde3e71fd60b1488a3 (patch) | |
tree | 22b8ce7fa912d9e9d3763af56351efe99e0bed2a /spec/unit/property_spec.rb | |
parent | 1d96b8c7bb96a476625a026bea58dd0f251af716 (diff) | |
download | chef-6e4783f4e71681c7a6fefedde3e71fd60b1488a3.tar.gz |
Don't validate `nil` when setting the value to nil
Diffstat (limited to 'spec/unit/property_spec.rb')
-rw-r--r-- | spec/unit/property_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb index ff5e135c78..152bad9bc0 100644 --- a/spec/unit/property_spec.rb +++ b/spec/unit/property_spec.rb @@ -319,6 +319,10 @@ describe "Chef::Resource.property" do it "when x is not set, it is not included in state" do expect(resource.state).to eq({}) end + it "when x is set to nil, it returns nil" do + resource.instance_eval { @x = nil } + expect(resource.x).to be_nil + end context "With a subclass" do let(:subresource_class) do |