summaryrefslogtreecommitdiff
path: root/spec/unit/property
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-03 14:32:43 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-23 15:23:01 -0700
commit4e34d816167af65b36c7a57ad33dca3b1f39c1e4 (patch)
tree0572f1f83c28db05fb5225837b13ab97c36fe3e2 /spec/unit/property
parentc4257f9d016871c6b4243079542d803d5e7fa383 (diff)
downloadchef-4e34d816167af65b36c7a57ad33dca3b1f39c1e4.tar.gz
Add "is" to property
Diffstat (limited to 'spec/unit/property')
-rw-r--r--spec/unit/property/validation_spec.rb110
1 files changed, 55 insertions, 55 deletions
diff --git a/spec/unit/property/validation_spec.rb b/spec/unit/property/validation_spec.rb
index a88ebfd0cf..4aa8a5474e 100644
--- a/spec/unit/property/validation_spec.rb
+++ b/spec/unit/property/validation_spec.rb
@@ -136,61 +136,61 @@ describe "Chef::Resource.property validation" do
# end
# is
- # context "is" do
- # # Class
- # validation_test 'is: String',
- # [ 'a', '' ],
- # [ nil, :a, 1 ]
- #
- # # Value
- # validation_test 'is: :a',
- # [ :a ],
- # [ :b, nil ]
- #
- # validation_test 'is: [ :a, :b ]',
- # [ :a, :b ],
- # [ [ :a, :b ], nil ]
- #
- # validation_test 'is: [ [ :a, :b ] ]',
- # [ [ :a, :b ] ],
- # [ :a, :b, nil ]
- #
- # # Regex
- # validation_test 'is: /abc/',
- # [ 'abc', 'wowabcwow' ],
- # [ '', 'abac', nil ]
- #
- # # PropertyType
- # validation_test 'is: PropertyType.new(is: :a)',
- # [ :a ],
- # [ :b, nil ]
- #
- # # RSpec Matcher
- # class Globalses
- # extend RSpec::Matchers
- # end
- #
- # validation_test "is: Globalses.eq(10)",
- # [ 10 ],
- # [ 1, nil ]
- #
- # # Proc
- # validation_test 'is: proc { |x| x }',
- # [ true, 1 ],
- # [ false, nil ]
- #
- # validation_test 'is: proc { |x| x > blah }',
- # [ 10 ],
- # [ -1 ]
- #
- # validation_test 'is: nil',
- # [ nil ],
- # [ 'a' ]
- #
- # validation_test 'is: [ String, nil ]',
- # [ 'a', nil ],
- # [ :b ]
- # end
+ context "is" do
+ # Class
+ validation_test 'is: String',
+ [ 'a', '' ],
+ [ nil, :a, 1 ]
+
+ # Value
+ validation_test 'is: :a',
+ [ :a ],
+ [ :b, nil ]
+
+ validation_test 'is: [ :a, :b ]',
+ [ :a, :b ],
+ [ [ :a, :b ], nil ]
+
+ validation_test 'is: [ [ :a, :b ] ]',
+ [ [ :a, :b ] ],
+ [ :a, :b, nil ]
+
+ # Regex
+ validation_test 'is: /abc/',
+ [ 'abc', 'wowabcwow' ],
+ [ '', 'abac', nil ]
+
+ # PropertyType
+ # validation_test 'is: PropertyType.new(is: :a)',
+ # [ :a ],
+ # [ :b, nil ]
+
+ # RSpec Matcher
+ class Globalses
+ extend RSpec::Matchers
+ end
+
+ validation_test "is: Globalses.eq(10)",
+ [ 10 ],
+ [ 1, nil ]
+
+ # Proc
+ validation_test 'is: proc { |x| x }',
+ [ true, 1 ],
+ [ false, nil ]
+
+ validation_test 'is: proc { |x| x > blah }',
+ [ 10 ],
+ [ -1 ]
+
+ validation_test 'is: nil',
+ [ nil ],
+ [ 'a' ]
+
+ validation_test 'is: [ String, nil ]',
+ [ 'a', nil ],
+ [ :b ]
+ end
# Combination
context "combination" do