spec/support/deep_eql.rb in yaks-0.4.1 vs spec/support/deep_eql.rb in yaks-0.4.2

- old
+ new

@@ -43,10 +43,11 @@ diffs << "at %s, %s" % [stack_as_jsonpath, message] @result = false end def compare(key) +#require 'pry' ; binding.pry push key if target[key] != expectation[key] if [Hash, Array].any?{|klz| target[key].is_a? klz } recurse(target[key], expectation[key]) else @@ -85,9 +86,14 @@ 0.upto([target.count, expectation.count].max) do |idx| compare idx end else failure_message("expected Array got #{@target.inspect}") + end + + else + if target != expectation + failure_message("expected #{expectation.inspect}, got #{@target.inspect}") end end result end