committee 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/committee/validation.rb +2 -2
- data/test/response_validator_test.rb +1 -1
- metadata +1 -1
data/lib/committee/validation.rb
CHANGED
@@ -32,9 +32,9 @@ module Committee
|
|
32
32
|
|
33
33
|
description = case identifier
|
34
34
|
when String
|
35
|
-
%{Invalid type for key "#{identifier}": expected #{value} to be #{allowed_types}.}
|
35
|
+
%{Invalid type for key "#{identifier}": expected #{value.inspect} to be #{allowed_types}.}
|
36
36
|
when Array
|
37
|
-
%{Invalid type at "#{identifier.join(":")}": expected #{value} to be #{allowed_types}.}
|
37
|
+
%{Invalid type at "#{identifier.join(":")}": expected #{value.inspect} to be #{allowed_types}.}
|
38
38
|
end
|
39
39
|
|
40
40
|
raise InvalidType, description
|
@@ -51,7 +51,7 @@ describe Committee::ResponseValidator do
|
|
51
51
|
it "detects mismatched types" do
|
52
52
|
@data.merge!("maintenance" => "not-bool")
|
53
53
|
e = assert_raises(Committee::InvalidType) { call }
|
54
|
-
message = %{Invalid type at "maintenance": expected not-bool to be ["boolean"].}
|
54
|
+
message = %{Invalid type at "maintenance": expected "not-bool" to be ["boolean"].}
|
55
55
|
assert_equal message, e.message
|
56
56
|
end
|
57
57
|
|