Skip to content

Expectation::toHaveMethod ​

Member of Expectation

idl
Expectation.toHaveMethod, name, $
  /_expect_failure

Verifies that the expectation value (an object) has a method. The method name is not case sensitive and may be a function or a procedure method.

Examples ​

idl
(it.expects(list())).toHaveMethod, 'add'
(it.expects(list()))._not_.toHaveMethod, 'bogus'

Arguments ​

name ​

requiredinputtype=String

Specify the name of the method to look for.

Keywords ​

_expect_failure {#kw-_expect_failure} ​

optionalinputtype=Boolean

If the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.

Licensed under MIT.