diff options
author | John Keiser <john@johnkeiser.com> | 2015-07-02 12:51:11 -0600 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-07-02 13:22:17 -0600 |
commit | ed2b0904361448173e5644dddacb48399fd8dc68 (patch) | |
tree | ab595538d6f4c339c144ccdacf9329d2e37d78f2 /spec/unit/property | |
parent | 21271c84ef78b1aac3b1708dbc9bf7c7a167b71d (diff) | |
download | chef-ed2b0904361448173e5644dddacb48399fd8dc68.tar.gz |
Make required name attributes workjk/required_name_attribute
Diffstat (limited to 'spec/unit/property')
-rw-r--r-- | spec/unit/property/validation_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/property/validation_spec.rb b/spec/unit/property/validation_spec.rb index e32147bd38..7ce6a45167 100644 --- a/spec/unit/property/validation_spec.rb +++ b/spec/unit/property/validation_spec.rb @@ -549,8 +549,8 @@ describe "Chef::Resource.property validation" do end with_property ':x, name_property: true, required: true' do - it "if x is not specified, retrieval fails" do - expect { resource.x }.to raise_error Chef::Exceptions::ValidationFailed + it "if x is not specified, retrieval succeeds" do + expect(resource.x).to eq 'blah' end it "value 1 is valid" do expect(resource.x 1).to eq 1 @@ -564,8 +564,8 @@ describe "Chef::Resource.property validation" do end with_property ':x, default: 10, required: true' do - it "if x is not specified, retrieval fails" do - expect { resource.x }.to raise_error Chef::Exceptions::ValidationFailed + it "if x is not specified, the default is returned" do + expect(resource.x).to eq 10 end it "value 1 is valid" do expect(resource.x 1).to eq 1 |