choosy 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|