Skip to content

Instantly share code, notes, and snippets.

@dansimau
Created April 11, 2016 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansimau/743bb5ea1e94355402d2e4e88b1d3f68 to your computer and use it in GitHub Desktop.
Save dansimau/743bb5ea1e94355402d2e4e88b1d3f68 to your computer and use it in GitHub Desktop.
mockery generation test
package foo
type FooInterface interface {
FooFunc()
}
package foo
import "mocks"
func Test() {
f := &mocks.FooInterface{}
f.FooFunc()
}
@dansimau
Copy link
Author

To run the test:

git clone https://gist.github.com/743bb5ea1e94355402d2e4e88b1d3f68.git
cd 743bb5ea1e94355402d2e4e88b1d3f68
mockery --name=FooInterface

Expected output:

Generating mock for: FooInterface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment