class Spectator::Config
- Spectator::Config
- Reference
- Object
Overview
Provides customization and describes specifics for how Spectator will run and report tests.
Defined in:
spectator/config.crspectator/config/builder.cr
spectator/config/cli_arguments_applicator.cr
Constructors
-
.default : self
Produces the default configuration.
-
.new(source)
Creates a new configuration.
Instance Method Summary
-
#formatter : Formatting::Formatter
Primary formatter all events will be sent to.
-
#iterator(group : ExampleGroup)
Creates an iterator configured to select the filtered examples.
-
#node_filter : NodeFilter
Filter used to select which examples to run.
-
#node_reject : NodeFilter
Filter used to select which examples to not run.
-
#random
Retrieves the configured random number generator.
-
#random_seed : UInt64
Seed used for random number generation.
-
#run_flags : RunFlags
Flags indicating how the spec should run.
-
#shuffle(items)
Shuffles the items in an array using the configured random settings.
-
#shuffle!(items)
Shuffles the items in an array using the configured random settings.
Instance methods inherited from class Object
should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_not
Constructor Detail
Creates a new configuration.
Properties are pulled from source.
Typically, source is a Config::Builder
.
Instance Method Detail
Creates an iterator configured to select the filtered examples.
Retrieves the configured random number generator. This will produce the same generator with the same seed every time.
Shuffles the items in an array using the configured random settings.
If #randomize?
is true, the items are shuffled and returned as a new array.
Otherwise, the items are left alone and returned as-is.
The array of items is never modified.
Shuffles the items in an array using the configured random settings.
If #randomize?
is true, the items are shuffled and returned.
Otherwise, the items are left alone and returned as-is.
The array of items is modified, the items are shuffled in-place.