struct

Spectator::TestValues

Inherits Enumerable < Struct < Value < Object

Collection of test values supplied to examples. Each value is labeled by a symbol that the example knows. The values also come with a name that can be given to humans.

Class methods

empty

Creates an empty set of sample values.

Source

Instance methods

add(id : Symbol, name : String, value) : TestValues

Adds a new value by duplicating the current set and adding to it. The new sample values with the additional value is returned. The original set of sample values is not modified.

Source
each

Iterates over all values and yields them.

Source
get_value(id : Symbol, value_type : T.class) : T forall T

Retrieves a value. The symbol for the value is used for retrieval. The value's type must be provided so that the wrapper can be cast.

Source
get_wrapper(id : Symbol)

Retrieves the wrapper for a value. The symbol for the value is used for retrieval.

Source