assert_json 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. data/lib/assert_json.rb +6 -1
  2. metadata +1 -1
@@ -43,7 +43,12 @@ module AssertJson
43
43
  def not_element(*args, &block)
44
44
  arg = args.shift
45
45
  token = @decoded_json
46
- raise_error("element #{arg} found, but not expected") if token.keys.include?(arg)
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: assert_json
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Thorsten B\xC3\xB6ttger"