-
Notifications
You must be signed in to change notification settings - Fork 23
No way to match on a subset of meta #10
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
Comments
@mykecameron, apologies for the late reply. I think it's better to make I'll be happy to take a look if you send a PR. |
Related #14 if somebody wants to pick it up 😃 |
@stas - something like this? will make |
@sa73917 yup, though the way you're checking for the subset could be a bit optimized, take a look at these sugestions (probably worth looking at the ruby v2.4+ compatibility though, so Thanks! |
Changed the subset logic as suggested and raised a PR |
have_meta
will only succeed on EXACT matches. Often I have shared examples that test for some omnipresent meta in responses across many endpoints (example, a UUID identifying the request which we use for debugging), but then some meta contents which are specific to a particular resource or API (example: pagination data for an index endpoint).We added a
contain_meta
matcher for this in our applications, happy to share back w/ a PR.Check out: master...mykecameron:add_partial_meta_matcher, I didn't want to open an unsolicited PR since its unclear to me what the best practices around contribution to this project are, or even if it is actively maintained. Any guidance would be appreciated!
The text was updated successfully, but these errors were encountered: