summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-02-06 16:50:26 +0100
committerThom May <thom@chef.io>2018-03-08 11:31:47 +0000
commitb5b471b70acbf224ba6f61380a7d6fbfd88530d7 (patch)
tree03274af1c859d9749bd5dd365726f563c6ce6c3b /spec/unit
parentffc74612f4856c9ba7a200945ce3d8eec68d1854 (diff)
downloadchef-b5b471b70acbf224ba6f61380a7d6fbfd88530d7.tar.gz
Add `introduced` property field
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/mixin/properties_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/mixin/properties_spec.rb b/spec/unit/mixin/properties_spec.rb
index faf2d98558..ee0c252381 100644
--- a/spec/unit/mixin/properties_spec.rb
+++ b/spec/unit/mixin/properties_spec.rb
@@ -11,7 +11,7 @@ module ChefMixinPropertiesSpec
property :a, "a", default: "a"
property :ab, %w{a b}, default: "a"
property :ac, %w{a c}, default: "a"
- property :d, "d", description: "The d property"
+ property :d, "d", description: "The d property", introduced: "14.0"
end
context "and a module B with properties b, ab and bc" do
@@ -41,6 +41,10 @@ module ChefMixinPropertiesSpec
expect(A.properties[:d].description).to eq "The d property"
end
+ it "A.properties can get the release that introduced `d`" do
+ expect(A.properties[:d].introduced).to eq "14.0"
+ end
+
it "B.properties has b, ab, and bc with types 'b', nil and ['b', 'c']" do
expect(B.properties.keys).to eq [ :b, :ab, :bc ]
expect(B.properties[:b].validation_options[:is]).to eq "b"