You should be able to do something like this:
mock := &SomeInterfaceMock{...}
subject := NewRealCode(mock)
assertMock := mock.Describe().(...)
subject.DoSomethingUsingMock()
assertMock(t)
assertMock = mock.Describe().(...)
subject.DoAnotherThingUsingMock()
assertMock(t)
Right now Describe() is a method on a mocker, which is a builder for mock objects, and ultimately produces the mock object alongside the assertMock function. It should act on an already existing mock object instead.
You should be able to do something like this:
Right now
Describe()is a method on a mocker, which is a builder for mock objects, and ultimately produces the mock object alongside theassertMockfunction. It should act on an already existing mock object instead.