diff --git a/mock/mock.go b/mock/mock.go index 727abd622..3a076e1ea 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -592,10 +592,8 @@ func AssertExpectationsForObjects(t TestingT, testObjects ...interface{}) bool { // 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 { - if s, ok := t.(tSkipped); ok { - if s.Skipped() { - return true - } + if s, ok := t.(interface{ Skipped() bool }); ok && s.Skipped() { + return true } if h, ok := t.(tHelper); ok { h.Helper() @@ -1168,10 +1166,6 @@ type tHelper interface { Helper() } -type tSkipped interface { - Skipped() bool -} - func assertOpts(expected, actual interface{}) (expectedFmt, actualFmt string) { expectedOpts := reflect.ValueOf(expected) actualOpts := reflect.ValueOf(actual)