Expectation::toBeInstanceOf
Member of Expectation
idl
Expectation.toBeInstanceOf, type, $
/_expect_failureVerifies that the expectation value is an object that is an instance of a class, including through inheritance (uses idl obj_isa()). Values that are not objects fail the expectation. For an array of objects, every element must be an instance of the class.
Examples
idl
(it.expects(list())).toBeInstanceOf, 'List'
(it.expects(orderedhash())).toBeInstanceOf, 'Hash'
(it.expects(42))._not_.toBeInstanceOf, 'List'Arguments
type
requiredinputtype=StringSpecify the class name to check, case insensitive.
Keywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.