mirror of https://github.com/stretchr/testify.git
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
parent
82616deabd
commit
635a01b704
|
@ -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