AlephExpectation
Base class: Object
Represents an expectation created by expect inside an active Aleph test.
Expectation values hold the actual value being checked and expose matcher methods such as to_equal, to_contain, and to_throw_message. Expectations only work while a test body, before_each hook, or after_each hook is actively executing.
Example
test "expectation value" {
var expectation = expect("aleph")
expectation.to_contain("lep")
}
Members
| Name | Description |
|---|---|
| not | Returns a negated expectation so the next matcher records a failure when it would normally pass. |
| to_be_greater_or_equal_than | Records a failure unless the actual numeric value is greater than or equal to expected. |
| to_be_greater_than | Records a failure unless the actual numeric value is greater than expected. |
| to_be_less_or_equal_than | Records a failure unless the actual numeric value is less than or equal to expected. |
| to_be_less_than | Records a failure unless the actual numeric value is less than expected. |
| to_contain | Records a failure unless the actual value contains the expected value. |
| to_equal | Records a failure unless the actual value equals the expected value. |
| to_have_length | Records a failure unless the actual value has the expected size. |
| to_have_type | Records a failure unless the actual value has the expected Aleph type name. |
| to_satisfy | Records a failure unless the predicate returns true for the actual value. |
| to_throw | Records a failure unless the expected action throws. |
| to_throw_message | Records a failure unless the expected action throws a matching message. |