Show type of the object instead just "Object" string

The `Implements` test was just showing a string instead the name of the
object that was not implementing the interface. Now the type of the
object is shown.
pull/240/head
Álex González 2015-11-08 00:15:59 +01:00
parent 82616deabd
commit 635a01b704
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