struct Spectator::TestValue(T)

Overview

Captures a value from a test and its label.

Defined in:

spectator/test_value.cr

Constructors

Instance Method Summary

Instance methods inherited from struct Spectator::TestExpression(T)

label : String label, to_s(io) to_s, value : T value

Constructor methods inherited from struct Spectator::TestExpression(T)

new(label : String) new

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(value : T, label : String) #

Creates the expression value with a custom label.


[View source]
def self.new(value : T) #

Creates the expression with a stringified value. This is used for the "should" syntax and when the label doesn't matter.


[View source]

Instance Method Detail

def inspect(io) #

Reports complete information about the expression.


[View source]
def value : T #

Actual value.


[View source]