-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please make a public generator for testify mocks akin to https://github.com/matryer/moq #728
Comments
I agree, would be lovely to have it right in testify But, until that's a reality, you could always try https://github.com/vektra/mockery. I've used it with success so far |
Maybe just a link to that from testify mock package godoc would do the
trick?
…-SCR
Sent from my iPhone
On Feb 15, 2019, at 9:40 PM, Nathaniel Morihara <notifications@github.com> wrote:
I agree, would be lovely to have it right in testify
*but*, until that's a reality, you could always try
https://github.com/vektra/mockery. I've used it with success so far
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#728 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/An-w7d5ytP48VK_xU7em34lpJNKccaBbks5vN5nhgaJpZM4a-WQD>
.
|
Unfortunately vektra/mockery does not seem to be maintained. I agree it would be somewhat better if this package provided a solution OOTB. |
I am forced to remove Would love to have an out of the box solution for it that also works with modules. |
I've built a tool for generating code and added support for generating testify mocks: https://github.com/sagikazarmark/mga#testify-mock-generator It works well with modules as well. I'm working on better documentation for the project, but the tool already works and generates mocks in a real life project. |
https://github.com/matryer/moq generates a mock from an interface which, though nice, isn't as rich a mocking language as testify (ability to just say how many times, or return what as part of test).
It would be great if testify could provide a means of generating, for instance, from:
this:
The text was updated successfully, but these errors were encountered: