Spectator::Expectation
Inherits Struct / Value / Object
Result of evaluating a matcher on a target. Contains information about the match, such as whether it was successful and a description of the operation.
Constructors
Creates the expectation.
The match_data comes from the result of calling Matcher#match.
The location is the location of the expectation in source code, if available.
A custom message can be used in case of a failure.
Instance methods
Location of the expectation in source code. This can be nil if the location can't be captured, for instance using the should syntax or dynamically created expectations.
Location of the expectation in source code. This can be nil if the location can't be captured, for instance using the should syntax or dynamically created expectations.
Additional information about the match, useful for debug. If nil, then the match was successful.