Creates an expectation that is fulfilled if the predicate returns
true when evaluated with the given object.
- Xcode 7.2+
The predicate to evaluate.
The object against which the predicate is evaluated.
An optional handler that performs custom evaluation when
The expectation periodically evaluates the predicate and also may use notifications or other events to optimistically re-evaluate.
If a handler is not provided, the first successful evaluation of the predicate will fulfill the expectation. If a handler is provided, the handler can override this default behavior and tailor the conditions under which the expectation should be considered fulfilled.