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

[RSpec] JSON matchers #2417

Open
lostie opened this issue Jun 27, 2018 · 1 comment
Open

[RSpec] JSON matchers #2417

lostie opened this issue Jun 27, 2018 · 1 comment

Comments

@lostie
Copy link
Contributor

lostie commented Jun 27, 2018

We have quite a lot of specs that require checking for the JSON output of an API.

This RSpec helpers should help us asserting more accurately the format and content of those outputs.

For example it allows us to use matchers inside the body, lets say for example if we're just interested in checking that we have a key foo with a value that is an Integer: https://relishapp.com/waterlink/rspec-json-expectations/docs/json-expectations/rspec-matcher-support-for-include-json-matcher

@colinbruce @kmahern This is not a blocker for the ping issues PR, but could improve the assertions being made in the tests to assert both keys and values

@jsugarman
Copy link
Contributor

we do already have this in the repo: https://github.com/collectiveidea/json_spec

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

No branches or pull requests

2 participants