mirror of https://github.com/stretchr/testify.git
Merge pull request #240 from agonzalezro/type
When implements shows the type of the given object is shown in the errorpull/238/merge
commit
e7a1d8890c
|
@ -214,7 +214,7 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg
|
|||
interfaceType := reflect.TypeOf(interfaceObject).Elem()
|
||||
|
||||
if !reflect.TypeOf(object).Implements(interfaceType) {
|
||||
return Fail(t, fmt.Sprintf("Object must implement %v", interfaceType), msgAndArgs...)
|
||||
return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...)
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue