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
I want to mock out a method that needs to respond with different return values and make assertions about its parameters. The example in the README looked like it does exactly what I want. However, I was unable to get mockery (or Testify more accurately) to run my lambda function and return its return values.
Ok, I see what you did. The example is wrong because it's expecting an argument as well, if you make it just Passthrough() string it will work. Otherwise you can also pass in a string like .On("Passthrough", "whatever").
Actually, looking at the example again, it's correct as it's passing AnythingOfType("string") as the argument to passthrough, which is a magic type defined by github.com/stretchr/testify/mock.
I want to mock out a method that needs to respond with different return values and make assertions about its parameters. The example in the README looked like it does exactly what I want. However, I was unable to get mockery (or Testify more accurately) to run my lambda function and return its return values.
Here's the closest I could come to following the instructions:
https://github.com/brycefisher/mockerytest
Am I doing something wrong here? It feels like I'm following the directions from the README. Thanks for your help!!
The text was updated successfully, but these errors were encountered: