struct Spectator::TestValue(T)
Overview
Captures a value from a test and its label.
Defined in:
spectator/test_value.crConstructors
-
.new(value : T, label : String)
Creates the expression value with a custom label.
-
.new(value : T)
Creates the expression with a stringified value.
Instance Method Summary
-
#inspect(io)
Reports complete information about the expression.
-
#value : T
Actual value.
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)
#
Creates the expression with a stringified value. This is used for the "should" syntax and when the label doesn't matter.