struct Spectator::Expectations::Expectation

Overview

Result of evaluating a matcher on an expectation partial.

Defined in:

spectator/expectations/expectation.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

should(matcher) should, should_eventually(matcher) should_eventually, should_never(matcher) should_never, should_not(matcher) should_not

Constructor Detail

def self.new(match_data : Matchers::MatchData, source : Source) #

Creates the expectation.


[View source]

Instance Method Detail

def description #

[View source]
def failure? #

Indicates that the expectation was not satisified.


[View source]
def failure_message #

Description of why the match failed.


[View source]
def failure_message? #

Description of why the match failed. If nil, then the match was successful.


[View source]
def satisfied? #

Indicates whether the matcher was satisified.


[View source]
def source : Source #

Location where this expectation was defined.


[View source]
def to_json(json : JSON::Builder) #

Creates the JSON representation of the expectation.


[View source]
def values #

Additional information about the match, useful for debug.


[View source]
def values? #

Additional information about the match, useful for debug. If nil, then the match was successful.


[View source]