Skip to content
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

Feature Request: Add support for test templates #749

Closed
kevinkirkup opened this issue Dec 11, 2020 · 2 comments · Fixed by #752
Closed

Feature Request: Add support for test templates #749

kevinkirkup opened this issue Dec 11, 2020 · 2 comments · Fixed by #752

Comments

@kevinkirkup
Copy link
Contributor

Currently ginkgo bootstraps supports setting a template.
I'd like to see the ginkgo generate also support setting a template.

For example, we are using gomock in our tests and there is a fair amount of boilerplate.
I'd like to specify my own template so I don't have to paste the boilerplate when create a new test.

@onsi
Copy link
Owner

onsi commented Dec 11, 2020

SGTM - you up for submitting a PR @kevinkirkup ?

@kevinkirkup
Copy link
Contributor Author

Yes.

@onsi onsi closed this as completed in #752 Dec 15, 2020
onsi pushed a commit that referenced this issue Dec 15, 2020
* Add support for using template to generate tests

Fixes #749

* Add unit test

* Fix test - package is foo_bar

* Fix integration test

For Test templates, the import path for the package being tests was
incorrect. Updating to check for a string that ends with the package
name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants