struct Spectator::Expectations::ExpectationPartial(T)

Overview

Stores part of an expectation (obviously). The part of the expectation this type covers is the actual value and source. This can also cover a block's behavior.

Defined in:

spectator/expectations/expectation_partial.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::Matcher) should, should_not(matcher : Spectator::Matchers::Matcher) should_not

Constructor Detail

def self.new(actual : TestExpression(T), source : Source) #

Creates the partial.


[View source]

Instance Method Detail

def actual : TestExpression(T) #

The actual value being tested. This also contains its label.


[View source]
def not_to(matcher) : Nil #

ditto


[View source]
def source : Source #

Location where this expectation was defined.


[View source]
def to(matcher) : Nil #

Asserts that some criteria defined by the matcher is satisfied.


[View source]
def to_not(matcher) : Nil #

Asserts that some criteria defined by the matcher is not satisfied. This is effectively the opposite of #to.


[View source]