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

[Testing] Use Interface over Pointer to *testing.T for Mock Expectations #334

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

sjmtan
Copy link
Contributor

@sjmtan sjmtan commented Jan 12, 2021

By utilizing the interface, which is what the mock.AssertExpectations method uses, this allows integration with other testing libraries that might not directly expose a pointer to testing.T.

From mock/mock.go:

// AssertExpectations asserts that everything specified with On and Return was
// in fact called as expected.  Calls may have occurred in any order.
func (m *Mock) AssertExpectations(t TestingT) bool {

Gingko T in case of https://onsi.github.io/ginkgo/#integrating-with-gomock.

@CLAassistant
Copy link

CLAassistant commented Jan 12, 2021

CLA assistant check
All committers have signed the CLA.

@vitarb vitarb merged commit 5fb8d51 into temporalio:master Jan 12, 2021
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 this pull request may close these issues.

3 participants