You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This matcher correctly emits diffs when used "directly" but when used as an argument matcher within a mock, the diff output no longer respects the redefined actual.
Subject of the issue
We have a custom matcher that matches "
as_json
-able" objects.For diffing, it redefines the
actual
.This matcher correctly emits diffs when used "directly" but when used as an argument matcher within a mock, the diff output no longer respects the redefined actual.
I suspect this may be related to rspec/rspec-expectations#1317
Your environment
Steps to reproduce
https://gist.github.com/jasonkarns/7ac8c418dc155ef3d3555c3a0d9ecc64
Expected behavior
Given the tests in linked gist above, I would expect the failure output to print the diffable values comparing the overridden
actual
:something like:
Actual behavior
The argument matcher failure message ignores the overridden
actual
value of the nested matcher and instead diffs against the originalactual
:The text was updated successfully, but these errors were encountered: