module Spectator

Overview

Module that contains all functionality related to Spectator.

Included Modules

Extended Modules

Defined in:

spectator.cr
spectator/abstract_expression.cr
spectator/anything.cr
spectator/block.cr
spectator/composite_node_filter.cr
spectator/config.cr
spectator/config/builder.cr
spectator/config/cli_arguments_applicator.cr
spectator/context.cr
spectator/context_delegate.cr
spectator/context_method.cr
spectator/dsl.cr
spectator/error_result.cr
spectator/example.cr
spectator/example_builder.cr
spectator/example_context_delegate.cr
spectator/example_context_method.cr
spectator/example_failed.cr
spectator/example_group.cr
spectator/example_group_builder.cr
spectator/example_group_hook.cr
spectator/example_group_iteration.cr
spectator/example_hook.cr
spectator/example_iterator.cr
spectator/example_pending.cr
spectator/example_procsy_hook.cr
spectator/expectation.cr
spectator/expectation_failed.cr
spectator/expression.cr
spectator/fail_result.cr
spectator/filtered_example_iterator.cr
spectator/formatting.cr
spectator/harness.cr
spectator/hooks.cr
spectator/iterative_example_group_builder.cr
spectator/label.cr
spectator/lazy.cr
spectator/lazy_wrapper.cr
spectator/line_node_filter.cr
spectator/location.cr
spectator/location_node_filter.cr
spectator/matchers.cr
spectator/metadata.cr
spectator/mocks.cr
spectator/multiple_expectations_failed.cr
spectator/name_node_filter.cr
spectator/node.cr
spectator/node_builder.cr
spectator/node_filter.cr
spectator/node_iterator.cr
spectator/null_context.cr
spectator/null_node_filter.cr
spectator/pass_result.cr
spectator/pending_example_builder.cr
spectator/pending_result.cr
spectator/profile.cr
spectator/report.cr
spectator/result.cr
spectator/run_flags.cr
spectator/runner.cr
spectator/runner_events.cr
spectator/spec.cr
spectator/spec_builder.cr
spectator/system_exit.cr
spectator/tag_node_filter.cr
spectator/value.cr
spectator/wrapper.cr

Constant Summary

CONFIG_FILE_PATH = ".spectator"

Path to the Spectator configuration file. The contents of this file should contain command-line arguments. Those arguments are automatically applied when Spectator starts. Arguments should be placed with one per line.

Log = ::Log.for(self)
VERSION = {{ (`shards version \"/builds/arctic-fox/spectator/src\"`).stringify.chomp }}

Current version of the Spectator library.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.autorun=(autorun) #

Flag indicating whether Spectator should automatically run tests. This should be left alone (set to true) in typical usage. There are times when Spectator shouldn't run tests. One of those is testing Spectator.


[View source]
def self.autorun? #

Flag indicating whether Spectator should automatically run tests. This should be left alone (set to true) in typical usage. There are times when Spectator shouldn't run tests. One of those is testing Spectator.


[View source]
def self.config #

Global configuration used by Spectator for running tests.


[View source]

Instance Method Detail

def configure(& : Config::Builder -> _) : Nil #

Provides a means to configure how Spectator will run and report tests. A ConfigBuilder is yielded to allow changing the configuration.

NOTE The configuration set here can be overriden with a .spectator file and command-line arguments.


[View source]
def random #

Random number generator for the test suite. All randomly generated values should be pulled from this. This provides reproducable results even though random values are used. The seed for this random generator is controlled by ConfigBuilder.seed=.


[View source]