waterlink / rspec-json_expectations

Set of matchers and helpers to allow you test your APIs responses like a pro.
https://www.relishapp.com/waterlink/rspec-json-expectations/docs
MIT License
140 stars 23 forks source link

feature: implement negation matching and failure presenting #4

Closed waterlink closed 9 years ago

waterlink commented 10 years ago

First, think of this use case and what does it mean:

expect(subject).not_to include_json(
  id: 27,
  name: "John",
  email: "john.smith@example.org"
)
waterlink commented 9 years ago

a) all of the json paths specified by this matcher should fail. b) at least one of the json paths specified by this matcher should fail

waterlink commented 9 years ago

Seems like b) is not very usable, but a) could be