Spectator::Matchers::ReceiveMatcher
Inherits Spectator::Matchers::StandardMatcher < Spectator::Matchers::Matcher < Struct < Value < Object
Constructors
Instance methods
Short text about the matcher's purpose. This explains what condition satisfies the matcher. The description is used when the one-liner syntax is used.
it { is_expected.to do_something }
The phrasing should be such that it reads "it ___." where the blank is what is returned by this method.
Message displayed when the matcher isn't satisifed.
This is only called when #match? returns false.
The message should typically only contain the test expression labels.
Actual values should be returned by #values.
Checks whether the matcher is satisifed with the expression given to it.
Additional information about the match failure when negated.
By default, just the actual value is produced (same as #values).
The return value must be a NamedTuple with Strings for each value.
The tuple can be of any size,
but the keys must be known at compile-time (as Symbols),
and the values must be strings.
Generally, the string values are produced by calling #inspect on the relevant object.
It should look like this:
{
expected: "Not foo",
actual: "bar",
}
The values should typically only contain the test expression values, not the labels.
Labeled should be returned by #failure_message_when_negated.
Additional information about the match failure.
By default, just the actual value is produced.
The return value must be a NamedTuple with Strings for each value.
The tuple can be of any size,
but the keys must be known at compile-time (as Symbols),
and the values must be strings.
Generally, the string values are produced by calling #inspect on the relevant object.
It should look like this:
{
expected: "foo",
actual: "bar",
}
The values should typically only contain the test expression values, not the labels.
Labeled should be returned by #failure_message.