to_have_type
Method of AlephExpectation.
Overloads
| Name | Description |
|---|---|
to_have_type(const string expected) -> void | Records a failure unless the actual value has the expected Aleph type name. |
to_have_type(const string expected, const Map options) -> void | Records a failure unless the actual value has the expected Aleph type name. |
to_have_type(const string expected) -> void
Records a failure unless the actual value has the expected Aleph type name.
Parameters
- expected: The expected type name.
Returns
Nothing. Failed expectations are collected in the active test result.
Example
expect("aleph").to_have_type("string")
to_have_type(const string expected, const Map options) -> void
Records a failure unless the actual value has the expected Aleph type name.
Parameters
- expected: The expected type name.
- options: Optional matcher options.
- message (String): Custom failure message to record when the matcher fails.
- stop (Bool): Stops collecting further expectations in the current test when this matcher fails.
Returns
Nothing. Failed expectations are collected in the active test result.
Example
expect("aleph").to_have_type("string", ["message": "expected a string"])