testify
testify copied to clipboard
Specific arguments prioritized over mock.Anything
mock.On("Foo", mock.Anything).Return(1) mock.On("Foo", "something specific").Return(2)
In other mocking tools it would return 2 if you passed "something specific" to Foo but with testify it returns 1 - I think specific values should be prioritized over the mock.Anything value when looking for expected calls.