deeply_valid 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/deeply_valid.gemspec +1 -1
- data/lib/deeply_valid/validation.rb +1 -1
- data/lib/deeply_valid/validation_helpers.rb +9 -0
- data/test/validation_helpers_test.rb +13 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/deeply_valid.gemspec
CHANGED
@@ -76,6 +76,19 @@ class ValidationHelpersTest < Test::Unit::TestCase
|
|
76
76
|
|
77
77
|
end
|
78
78
|
|
79
|
+
|
80
|
+
context "boolean helper" do
|
81
|
+
|
82
|
+
should "validate correctly" do
|
83
|
+
assert Sample.boolean.valid?(true)
|
84
|
+
assert Sample.boolean.valid?(false)
|
85
|
+
assert !Sample.boolean.valid?(nil)
|
86
|
+
assert !Sample.boolean.valid?("")
|
87
|
+
assert !Sample.boolean.valid?(123)
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
79
92
|
context "date helper" do
|
80
93
|
|
81
94
|
should "validate correctly" do
|