Merge pull request #240 from agonzalezro/type

When implements shows the type of the given object is shown in the error
This commit is contained in:
Ernesto Jiménez 2015-11-07 23:40:24 +00:00
commit e7a1d8890c

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