This release fixes #1785 introduced in v1.11.0 where expected argument values implementing the stringer interface (String() string
) with a method which mutates their value, when passed to mock.Mock.On (m.On("Method", <expected>).Return()
) or actual argument values passed to mock.Mock.Called may no longer match one another where they previously did match. The behaviour prior to v1.11.0 where the stringer is always called is restored. Future testify releases may not call the stringer method at all in this case.
What's Changed
- Backport #1786 to release/1.11: mock: revert to pre-v1.11.0 argument matching behavior for mutating stringers by @brackendawson in #1788
Full Changelog: v1.11.0...v1.11.1