Skip to content

Commit

Permalink
fix check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPavlenko committed Feb 14, 2013
1 parent df4c09a commit cfa57d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json_spec/matchers/have_json_keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(keys)
def matches?(json)
@data = parse_json(json, @path)
return false unless @data.is_a?(Hash)
!@keys.map{|f| @data.has_key?(f.to_s)}.include?(false)
@keys.all?{|key| @data.has_key?(key.to_s)}
end

def at_path(path)
Expand Down

0 comments on commit cfa57d0

Please sign in to comment.