summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-03 15:55:26 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-23 15:23:01 -0700
commitc7f314f08d8baa0d5d8743153e244f0b4daec5e3 (patch)
treeb31b2e4bcd4face7082cd6f391f451c2dc83d02b /spec
parent0a55c383bcd1f658f68c4ee1dbb2dd910cea052b (diff)
downloadchef-c7f314f08d8baa0d5d8743153e244f0b4daec5e3.tar.gz
Add property= setter to properties
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/property_spec.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index 5f88561f3a..908f7f549d 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -87,20 +87,20 @@ describe "Chef::Resource.property" do
expect(resource.bare_property 20).to eq 20
expect(resource.bare_property).to eq 20
end
- # it "can be set with =" do
- # expect(resource.bare_property 10).to eq 10
- # expect(resource.bare_property).to eq 10
- # end
+ it "can be set with =" do
+ expect(resource.bare_property 10).to eq 10
+ expect(resource.bare_property).to eq 10
+ end
# it "can be set to nil with =" do
# expect(resource.bare_property 10).to eq 10
# expect(resource.bare_property = nil).to be_nil
# expect(resource.bare_property).to be_nil
# end
- # it "can be updated with =" do
- # expect(resource.bare_property 10).to eq 10
- # expect(resource.bare_property = 20).to eq 20
- # expect(resource.bare_property).to eq 20
- # end
+ it "can be updated with =" do
+ expect(resource.bare_property 10).to eq 10
+ expect(resource.bare_property = 20).to eq 20
+ expect(resource.bare_property).to eq 20
+ end
end
with_property ":x, Integer" do
@@ -118,8 +118,8 @@ describe "Chef::Resource.property" do
it "x is inherited" do
expect(subresource.x 10).to eq 10
expect(subresource.x).to eq 10
- # expect(subresource.x = 20).to eq 20
- # expect(subresource.x).to eq 20
+ expect(subresource.x = 20).to eq 20
+ expect(subresource.x).to eq 20
# expect(subresource_class.properties[:x]).not_to be_nil
end
@@ -137,15 +137,15 @@ describe "Chef::Resource.property" do
it "x is still there" do
expect(subresource.x 10).to eq 10
expect(subresource.x).to eq 10
- # expect(subresource.x = 20).to eq 20
- # expect(subresource.x).to eq 20
+ expect(subresource.x = 20).to eq 20
+ expect(subresource.x).to eq 20
# expect(subresource_class.properties[:x]).not_to be_nil
end
it "y is there" do
expect(subresource.y 10).to eq 10
expect(subresource.y).to eq 10
- # expect(subresource.y = 20).to eq 20
- # expect(subresource.y).to eq 20
+ expect(subresource.y = 20).to eq 20
+ expect(subresource.y).to eq 20
# expect(subresource_class.properties[:y]).not_to be_nil
end
it "y is not on the superclass" do
@@ -164,8 +164,8 @@ describe "Chef::Resource.property" do
it "x is still there" do
expect(subresource.x 10).to eq 10
expect(subresource.x).to eq 10
- # expect(subresource.x = 20).to eq 20
- # expect(subresource.x).to eq 20
+ expect(subresource.x = 20).to eq 20
+ expect(subresource.x).to eq 20
# expect(subresource_class.properties[:x]).not_to be_nil
# expect(subresource_class.properties[:x]).not_to eq resource_class.properties[:x]
end
@@ -190,8 +190,8 @@ describe "Chef::Resource.property" do
it "x is still there" do
expect(subresource.x "10").to eq "10"
expect(subresource.x).to eq "10"
- # expect(subresource.x = "20").to eq "20"
- # expect(subresource.x).to eq "20"
+ expect(subresource.x = "20").to eq "20"
+ expect(subresource.x).to eq "20"
# expect(subresource_class.properties[:x]).not_to be_nil
# expect(subresource_class.properties[:x]).not_to eq resource_class.properties[:x]
end