You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the mocking style of testify is more nature than gomock,and hope it can be hooked into ginkgo(a BDD framework:https://github.com/onsi),so posted a function request here:onsi/ginkgo#17 the developer of ginkgo said:
It looks like testify uses (*testing.T) directly instead of an interface (which gomock does). Ginkgo can provide such frameworks with a Fail function that one can wrap in such a way to satisfy most interfaces (this is how we support go mock), but *testing.T refers to a concrete type and passing in the testing.T for the test that Ginkgo runs in would cause the entire suite to fail should one of your mock assertions fail...
His suggestion(or needing) is:replaces *testing.T with an interface first,so question:is it possible?.
The text was updated successfully, but these errors were encountered:
I think the mocking style of testify is more nature than gomock,and hope it can be hooked into ginkgo(a BDD framework:https://github.com/onsi),so posted a function request here:onsi/ginkgo#17 the developer of ginkgo said:
It looks like testify uses (*testing.T) directly instead of an interface (which gomock does). Ginkgo can provide such frameworks with a Fail function that one can wrap in such a way to satisfy most interfaces (this is how we support go mock), but *testing.T refers to a concrete type and passing in the testing.T for the test that Ginkgo runs in would cause the entire suite to fail should one of your mock assertions fail...
His suggestion(or needing) is:replaces *testing.T with an interface first,so question:is it possible?.
—
Reply to this email directly or view it on GitHub.
I think the mocking style of testify is more nature than gomock,and hope it can be hooked into ginkgo(a BDD framework:https://github.com/onsi),so posted a function request here:onsi/ginkgo#17 the developer of ginkgo said:
It looks like testify uses (*testing.T) directly instead of an interface (which gomock does). Ginkgo can provide such frameworks with a Fail function that one can wrap in such a way to satisfy most interfaces (this is how we support go mock), but *testing.T refers to a concrete type and passing in the testing.T for the test that Ginkgo runs in would cause the entire suite to fail should one of your mock assertions fail...
His suggestion(or needing) is:replaces *testing.T with an interface first,so question:is it possible?.
The text was updated successfully, but these errors were encountered: