Open Epigene opened 1 year ago
:wave: Hi, this is a known limitation of our differ which essentially only uses strings to produce diffs, so its unaware that the two sides did match it just sees the difference in the output used, theres not much we can do about it without a complete rewrite of the differ which is something we are interested in but has yet to find someone with enough time to finish it, I've transferred the issue to rspec-support
which provides this functionality and renamed it slightly to better keep track of it, it related to #365 and #518.
Subject of the issue
Using
.to match
with a complex expectation that mixes pure values with "fuzzy" matchers likeanything
produces false positives in Diff, obfuscating which key actually differs from the expectation.I don't know whether this is a problem with
match
oranything
/*_including
.Your environment
Steps to reproduce
Output:
Expected behavior
I'm expecting that Diff part will highlight only the key(s) actually failing their asserts, which is only
:d
.Actual behavior
Unfortunately, keys
:a
and:b
are also highlighted, likely due to them using "fuzzy" matchers.