-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make *testing.T object available from inside spec functions #4
Comments
+1. I might see if I can hack some code in that allows this and PR it. |
I'd like this functionality as well. @orfjackal, any plans to merge this in? @rafrombrc, any plans to merge this in your fork? |
@jveldridge No, I worked around it. Turned out I was able to appease gomock w/ a simple, fake testing context, see https://github.com/mozilla-services/heka/blob/dev/pipeline/testsupport/support.go#L36. In other news, I haven't been very happy w/ gomock, wouldn't really recommend it for use. |
Gotcha. I'm actually using testify (https://github.com/stretchr/testify/) having also been unhappy with gomock, but there's a similar issue. I'm likewise able to work around it, but seemed like this approach would be more elegant. |
I've hit a hiccup trying to use gomock w/ gospec b/c creating a gomock controller requires access to the testing object that go usually passes in to tests. Ideally there'd be a way to get access to the lower level testing object from within the spec functions, possibly as a method call on the context object.
The text was updated successfully, but these errors were encountered: