abstract struct Spectator::TestExpression(T)

Overview

Base type for capturing an expression from a test.

Direct Known Subclasses

Defined in:

spectator/test_expression.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(label : String) #

Creates the common base of the expression.


[View source]

Instance Method Detail

def label : String #

User-friendly string displayed for the actual expression being tested. For instance, in the expectation:

expect(foo).to eq(bar)

This property will be "foo". It will be the literal string "foo", and not the actual value of the foo.


[View source]
def to_s(io) #

String representation of the expression.


[View source]
abstract def value : T #

[View source]