assert_json
assert_json copied to clipboard
Provide an easy way to test json strings
This allows doing additonal asserts on the value like: has 'price' do |price| assert_operator price, :>, 0 end
We love this library, but there's one thing that is really irking. The way test failures are reported... Given large assertions (we have large json objects), when a failure occurs...
#has on Array level removes item from Array, without cloning or something, it creates all sorts of unexpected issues, especially if called #has on Array by mistake. I suggest only...