committee 0.4.11 → 0.4.12
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/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
|
|