class

Spectator::Config::Builder

Inherits Reference / Object

Mutable configuration used to produce a final configuration. Use the setters in this class to incrementally build a configuration. Then call #build to create the final configuration.

Instance methods

add_after_all_hook(hook)

Attaches a hook to be invoked after each top-level example group.

Source
add_after_each_hook(hook)

Attaches a hook to be invoked after every example. The current example is provided as a block argument.

Source
add_after_suite_hook(hook)

Attaches a hook to be invoked after all examples in the test suite.

Source
add_around_each_hook(hook)

Attaches a hook to be invoked around every example. The current example in procsy form is provided as a block argument.

Source
add_before_all_hook(hook)

Attaches a hook to be invoked before each top-level example group.

Source
add_before_each_hook(hook)

Attaches a hook to be invoked before every example. The current example is provided as a block argument.

Source
add_before_suite_hook(hook)

Attaches a hook to be invoked before all examples in the test suite.

Source
add_formatter(formatter : Formatting::Formatter)

Adds an extra formatter to use for reporting test progress and results.

Source
add_node_filter(filter : NodeFilter)

Adds a filter to determine which examples can run.

Source
add_node_reject(filter : NodeFilter)

Adds a filter to prevent examples from running.

Source
after_all

Defines a block of code to execute after each top-level example group.

Source
after_each

Defines a block of code to execute after every example. The current example is provided as a block argument.

Source
after_suite

Defines a block of code to execute after all examples in the test suite.

Source
around_each

Defines a block of code to execute around every example. The current example in procsy form is provided as a block argument.

Source
before_all

Defines a block of code to execute before each top-level example group.

Source
before_each

Defines a block of code to execute before every. The current example is provided as a block argument.

Source
before_suite

Defines a block of code to execute before all examples in the test suite.

Source
build

Creates a configuration.

Source
dry_run

Enables dry-run mode.

Source
dry_run=(flag)

Enables or disables dry-run mode.

Source
fail_blank

Enables fail-blank mode (fail on no tests).

Source
fail_blank=(flag)

Enables or disables fail-blank mode.

Source
fail_fast

Enables fail-fast mode.

Source
fail_fast=(flag)

Sets the fail-fast flag.

Source
filter_run_excluding(*tags : Symbol, **values)

Specifies one or more tags to exclude from running examples.

Source
filter_run_including(*tags : Symbol, **values)

Specifies one or more tags to constrain running examples to.

Source
filter_run_when_matching(*tags : Symbol, **values)

Specifies one or more tags to filter on only if they're present in the spec.

Source
formatter=(formatter : Formatting::Formatter)

Sets the primary formatter to use for reporting test progress and results.

Source
profile

Displays profiling information

Source
profile=(flag)

Enables or disables displaying profiling information.

Source
random_seed

Seed used for random number generation.

Source
random_seed=(random_seed : UInt64)

Seed used for random number generation.

Source
randomize

Randomizes test execution order.

Source
randomize=(flag)

Enables or disables running tests in a random order.

Source
run_flags

Toggles indicating how the test spec should execute.

Source
run_flags=(run_flags : Spectator::RunFlags)

Toggles indicating how the test spec should execute.

Source