choosy 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/VERSION +1 -1
- data/lib/choosy/verifier.rb +1 -0
- data/spec/choosy/verifier_spec.rb +8 -0
- metadata +2 -2
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/choosy/verifier.rb
CHANGED
@@ -41,6 +41,14 @@ module Choosy
|
|
41
41
|
v.verify!(@res)
|
42
42
|
}.should_not raise_error
|
43
43
|
end
|
44
|
+
|
45
|
+
it "should fail when an enum is not valid" do
|
46
|
+
b.enum :enum, [:a, :b], "An enum"
|
47
|
+
@res.options[:enum] = :c
|
48
|
+
attempting {
|
49
|
+
v.verify!(@res)
|
50
|
+
}.should raise_error(Choosy::ValidationError, /unrecognized value/)
|
51
|
+
end
|
44
52
|
end
|
45
53
|
|
46
54
|
describe :required? do
|