chancancode / json_expressions

JSON matchmaking for all your API testing needs.
MIT License
415 stars 38 forks source link

JsonExpressions::Matcher#match_hash doesn't properly handle "false" value in expectation #1

Closed gfeil closed 12 years ago

gfeil commented 12 years ago

Currently, when attempting to match against an expected value of "false", the test fails. This is caused by match_hash doing a "||" concatenation of a hash lookup of the key as a string with the key as a symbol. If the actual hash contains string keys, this lookup will result in nil instead of false, which fails the comparison.

BTW, this is an awesome library. Thanks for sharing it!

Regards, George

chancancode commented 12 years ago

Fixed in 0.7.1. Thanks so much @gfeil !