Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"Expected Included JSON" RSpec Exception doesn't have any more info #45
$ step 'the JSON response should include:', JSON.pretty_generate(data) *** RSpec::Expectations::ExpectationNotMetError Exception: Expected included JSON
$ step 'the JSON response should be:', JSON.pretty_generate(data) *** RSpec::Expectations::ExpectationNotMetError Exception: Expected equivalent JSON Diff: @@ -2,19 +2,7 @@ (diff)
Ruby 2 / Rails 4 / JSON Spec 1.1.1
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
...course, the tests fail because it breaks things that way. Fixed; just provide what's needed for the diff (diffable, expected, actual), but don't override any of the existing functionality. I think the full diff works - rather than just showing what's expected and missing - since it provides context. I'll chuck you a pull request, and if you want some more in the way of testing/functionality, let me know?