summaryrefslogtreecommitdiff
path: root/spec/unit/property_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-03 15:03:18 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-23 15:23:01 -0700
commit2278a61bc0fafe7fdd208c30b12cc11db9547d04 (patch)
treec3553d800581e515a238cf5b7a161fcae7ff5c33 /spec/unit/property_spec.rb
parent4e34d816167af65b36c7a57ad33dca3b1f39c1e4 (diff)
downloadchef-2278a61bc0fafe7fdd208c30b12cc11db9547d04.tar.gz
Add property Type as an alias to is
Diffstat (limited to 'spec/unit/property_spec.rb')
-rw-r--r--spec/unit/property_spec.rb17
1 files changed, 6 insertions, 11 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index d948ad20e0..17857b8a57 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -103,8 +103,7 @@ describe "Chef::Resource.property" do
# end
end
- # with_property ":x, Integer"
- with_property ':x, kind_of: Integer' do
+ with_property ":x, Integer" do
context "and subclass" do
let(:subresource_class) do
new_resource_name = self.class.new_resource_name
@@ -181,12 +180,10 @@ describe "Chef::Resource.property" do
end
end
- # context "with property :x, String on the subclass" do
- context "with property :x, kind_of: String on the subclass" do
+ context "with property :x, String on the subclass" do
before do
subresource_class.class_eval do
- # property :x, String
- property :x, kind_of: String
+ property :x, String
end
end
@@ -428,8 +425,7 @@ describe "Chef::Resource.property" do
end
context "validation of defaults" do
- #with_property ':x, String, default: 10' do
- with_property ':x, default: 10, kind_of: String' do
+ with_property ':x, String, default: 10' do
it "when the resource is created, no error is raised" do
resource
end
@@ -443,7 +439,7 @@ describe "Chef::Resource.property" do
end
# with_property ":x, String, default: lazy { Namer.next_index }" do
- with_property ":x, default: Chef::DelayedEvaluator.new { Namer.next_index }, kind_of: String" do
+ with_property ":x, String, default: Chef::DelayedEvaluator.new { Namer.next_index }" do
it "when the resource is created, no error is raised" do
resource
end
@@ -639,8 +635,7 @@ describe "Chef::Resource.property" do
# end
# end
- # with_property ':x, String' do
- with_property ':x, kind_of: String' do
+ with_property ':x, String' do
it "lazy values are not validated on set" do
resource.x lazy { Namer.next_index }
expect(Namer.current_index).to eq 0