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
Diffs for arrays of multiline strings don't make much sense #212
Comments
@myronmarston could the strings be escaped before being passed into diff when expecting with collections/arrays? That is the diff would look like: Diff: (and similar for sets) |
Maybe. Want to take a stab at it? |
I can't immediately, but I'm going to have more time in a couple of weeks, so I could probably take a look then. |
@myronmarston so I got bored in a lecture and hacked this together:
is this what we want? |
Another example:
|
That's definitely a big improvement. We can always start there and iterate on it. |
Aight, I'll build some specs and fire off a pr. |
This should be closed now right? |
Yep. As usual, I forgot to close it... |
Given:
This is the failure output:
The diff doesn't make much sense here. I think the solution is to diff the arrays as objects, not strings, but my first attempt to make that change (e.g. by removing the
flatten
calls in fail_with) broke some other things. Overall, all the flattening in fail_with feels hacky and is confusing, but I'm not sure what the right fix is yet.The text was updated successfully, but these errors were encountered: