diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/property_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb index 456da89dcf..9ecf7a4cde 100644 --- a/spec/unit/property_spec.rb +++ b/spec/unit/property_spec.rb @@ -142,6 +142,18 @@ describe "Chef::Resource.property" do expect(subresource.x).to be_nil end end + + context "with property :x, default: 10 on the subclass" do + before do + subresource_class.class_eval do + property :x, default: 10 + end + end + + it "x is no longer name_property" do + expect(subresource.x).to eq(10) + end + end end end |