Merge pull request #240 from agonzalezro/type

When implements shows the type of the given object is shown in the error
pull/238/merge
Ernesto Jiménez 2015-11-07 23:40:24 +00:00
commit e7a1d8890c
1 changed files with 1 additions and 1 deletions

View File

@ -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