diff --git a/expect.go b/expect.go index 5669449..85150fe 100644 --- a/expect.go +++ b/expect.go @@ -27,6 +27,7 @@ type baseMock interface { // MatchExpectationsInOrder gives an option whether to match all expectations in the order they were set or not. MatchExpectationsInOrder(b bool) + ExpectDo(args ...interface{}) *ExpectedCmd ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice ExpectIntDo(args ...interface{}) *ExpectedInt ExpectStringSliceDo(args ...interface{}) *ExpectedStringSlice diff --git a/mock.go b/mock.go index 15671ba..8ed90cf 100644 --- a/mock.go +++ b/mock.go @@ -408,6 +408,13 @@ func (m *mock) ExpectWatch(keys ...string) *ExpectedError { return e } +func (m *mock) ExpectDo(args ...interface{}) *ExpectedCmd { + e := &ExpectedCmd{} + e.cmd = redis.NewCmd(m.ctx, args...) + m.pushExpect(e) + return e +} + func (m *mock) ExpectIntSliceDo(args ...interface{}) *ExpectedIntSlice { e := &ExpectedIntSlice{} e.cmd = redis.NewIntSliceCmd(m.ctx, args...)