Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Failure Message JSON #44

Merged
merged 1 commit into from
Oct 28, 2016
Merged

Format Failure Message JSON #44

merged 1 commit into from
Oct 28, 2016

Conversation

seanpdoyle
Copy link
Collaborator

This commit modifies the RSpec Matcher to use
JSON.pretty_generate to improve the formatting of JSON bodies
and schemata that appear in failure messages.

Additionally, the json-schema provided error messages have been moved
to the top of the failure messages, so that the reasons for failure
appear above (potentially lengthy) JSON bodies.

This commit modifies the RSpec Matcher to use
[`JSON.pretty_generate`][docs] to improve the formatting of JSON bodies
and schemata that appear in failure messages.

Additionally, the `json-schema` provided error messages have been moved
to the top of the failure messages, so that the reasons for failure
appear above (potentially lengthy) JSON bodies.

[docs]: http://ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html#method-i-pretty_generate
@seanpdoyle seanpdoyle merged commit 14a474e into master Oct 28, 2016
@seanpdoyle seanpdoyle deleted the format-errors branch October 28, 2016 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant