class Spectator::Config::Builder
- Spectator::Config::Builder
- Reference
- Object
Overview
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.
Defined in:
spectator/config/builder.crInstance Method Summary
-
#add_after_all_hook(hook)
Attaches a hook to be invoked after each top-level example group.
-
#add_after_each_hook(hook)
Attaches a hook to be invoked after every example.
-
#add_after_suite_hook(hook)
Attaches a hook to be invoked after all examples in the test suite.
-
#add_around_each_hook(hook)
Attaches a hook to be invoked around every example.
-
#add_before_all_hook(hook)
Attaches a hook to be invoked before each top-level example group.
-
#add_before_each_hook(hook)
Attaches a hook to be invoked before every example.
-
#add_before_suite_hook(hook)
Attaches a hook to be invoked before all examples in the test suite.
-
#add_formatter(formatter : Formatting::Formatter)
Adds an extra formatter to use for reporting test progress and results.
-
#add_node_filter(filter : NodeFilter)
Adds a filter to determine which examples can run.
-
#add_node_reject(filter : NodeFilter)
Adds a filter to prevent examples from running.
-
#after_all(&block)
Defines a block of code to execute after each top-level example group.
-
#after_each(&block : Example -> _)
Defines a block of code to execute after every example.
-
#after_suite(&block)
Defines a block of code to execute after all examples in the test suite.
-
#around_each(&block : Example::Procsy -> _)
Defines a block of code to execute around every example.
-
#before_all(&block)
Defines a block of code to execute before each top-level example group.
-
#before_each(&block : Example -> _)
Defines a block of code to execute before every.
-
#before_suite(&block)
Defines a block of code to execute before all examples in the test suite.
-
#build : Config
Creates a configuration.
-
#dry_run
Enables dry-run mode.
-
#dry_run=(flag)
Enables or disables dry-run mode.
-
#fail_blank
Enables fail-blank mode (fail on no tests).
-
#fail_blank=(flag)
Enables or disables fail-blank mode.
-
#fail_fast
Enables fail-fast mode.
-
#fail_fast=(flag)
Sets the fail-fast flag.
-
#filter_run_excluding(*tags : Symbol, **values)
Specifies one or more tags to exclude from running examples.
-
#filter_run_including(*tags : Symbol, **values)
Specifies one or more tags to constrain running examples to.
-
#filter_run_when_matching(*tags : Symbol, **values)
Specifies one or more tags to filter on only if they're present in the spec.
-
#formatter=(formatter : Formatting::Formatter)
Sets the primary formatter to use for reporting test progress and results.
-
#profile
Displays profiling information
-
#profile=(flag)
Enables or disables displaying profiling information.
-
#random_seed : UInt64
Seed used for random number generation.
-
#random_seed=(random_seed : UInt64)
Seed used for random number generation.
-
#randomize
Randomizes test execution order.
-
#randomize=(flag)
Enables or disables running tests in a random order.
-
#run_flags : Spectator::RunFlags
Toggles indicating how the test spec should execute.
-
#run_flags=(run_flags : Spectator::RunFlags)
Toggles indicating how the test spec should execute.
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
Instance Method Detail
Attaches a hook to be invoked after every example. The current example is provided as a block argument.
Attaches a hook to be invoked after all examples in the test suite.
Attaches a hook to be invoked around every example. The current example in procsy form is provided as a block argument.
Attaches a hook to be invoked before every example. The current example is provided as a block argument.
Attaches a hook to be invoked before all examples in the test suite.
Adds an extra formatter to use for reporting test progress and results.
Defines a block of code to execute after every example. The current example is provided as a block argument.
Defines a block of code to execute around every example. The current example in procsy form is provided as a block argument.
Defines a block of code to execute before every. The current example is provided as a block argument.
Defines a block of code to execute before all examples in the test suite.
Specifies one or more tags to exclude from running examples.
Specifies one or more tags to constrain running examples to.
Specifies one or more tags to filter on only if they're present in the spec.
Sets the primary formatter to use for reporting test progress and results.
Toggles indicating how the test spec should execute.