-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Add support for choosing differs #97
Comments
See #79 for some background info on this. |
I like this API. For maximum flexibility, I think this should use the |
Agreed. |
I'd like to have solid defaults as well. The question is whether to make them hard dependencies (as we do now with diff-lcs) or make it more like |
I think most rspec users (including myself) don't have strong opinions about what differ they want to use, but they do want a decent option that immediately works when they Thus, I think it's good to keep |
As (another) rspec user I want something that will (predictably) work out of the box. The issue I was trying to solve with http://github.com/playup/diff_matcher in the first place, was that rspec doesn't have a JSON matcher (or a decent hash matcher that can be used to to perform that match).
And it actually behaves differently to the
(This would pass in We're happy with the Using something like the rspec configuration API above could be a nice compromise, but since JSON is actually a String we'd still need our own custom matcher to match JSON anyway. |
|
We've had a few issues and pull requests dealing with diffing, but I think we need a more holistic solution. There are a growing number of diffing solutions out there now, each of which are going to appeal more to some people than others, so I think we should have a reasonable default behavior, but then expose an API for choosing your own differ. Something like:
The form with a single argument would invoke the supplied block if both expected and actual values match the argument, otherwise the default would be used.
The text was updated successfully, but these errors were encountered: