Spectator::Value(T)
Inherits Spectator::Expression / Spectator::AbstractExpression / Reference / Object
Represents a value from a test.
This is typically captured by an expect macro.
It consists of a label and the value of the expression.
The label should be a string recognizable by the user,
or nil if one isn't available.
Constructors
new(value : T, label : Label)
Creates the value. Expects the value of the expression and a label describing it. The label is usually the Crystal code evaluating to the value.
new(value : T)
Creates the value.
Expects the value of the expression.
It can be nil if it isn't available.
A label is generated by calling #inspect on the value.