testify
testify copied to clipboard
[Feature Request] Create mock.AnyArgs
Scenario:
I have a function that is used in a lot of places, and I have to change the function signature, adding a new parameter. All of the mocks of this function are used with func(mock.Anything) because I dont want to validate the argument during the tests. when I add a new argument, I have to go through hundreds of calls to func and add another mock.Anything.
Proposition:
It would be very nice to have a fallback for this usecase, something like mock.IgnoreArgs or whatever, so the expectation will not fail and I will get the return I want, without having to refactor hundreds of calls for this function inside tests.