assert_json 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/assert_json.rb +6 -1
- metadata +1 -1
data/lib/assert_json.rb
CHANGED
@@ -43,7 +43,12 @@ module AssertJson
|
|
43
43
|
def not_element(*args, &block)
|
44
44
|
arg = args.shift
|
45
45
|
token = @decoded_json
|
46
|
-
|
46
|
+
case token
|
47
|
+
when Array
|
48
|
+
raise_error("element #{arg} found, but not expected") if token.include?(arg)
|
49
|
+
else
|
50
|
+
raise_error("element #{arg} found, but not expected") if token.keys.include?(arg)
|
51
|
+
end
|
47
52
|
end
|
48
53
|
|
49
54
|
private
|