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/dsl/reserved.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/mocks/abstract_arguments.cr
spectator/mocks/allow.cr
spectator/mocks/arguments.cr
spectator/mocks/double.cr
spectator/mocks/exception_stub.cr
spectator/mocks/formal_arguments.cr
spectator/mocks/lazy_double.cr
spectator/mocks/method_call.cr
spectator/mocks/mock.cr
spectator/mocks/mock_registry.cr
spectator/mocks/mock_registry_entry.cr
spectator/mocks/mocked.cr
spectator/mocks/multi_value_stub.cr
spectator/mocks/null_double.cr
spectator/mocks/null_stub.cr
spectator/mocks/proc_stub.cr
spectator/mocks/reference_mock_registry.cr
spectator/mocks/stub.cr
spectator/mocks/stub_modifiers.cr
spectator/mocks/stubbable.cr
spectator/mocks/stubbed_name.cr
spectator/mocks/stubbed_type.cr
spectator/mocks/typed_stub.cr
spectator/mocks/unexpected_message.cr
spectator/mocks/value_mock_registry.cr
spectator/mocks/value_stub.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 \"/srv/crystaldoc.info/gitlab-arctic-fox-spectator-v0.12.1/src\"`).stringify.chomp }}

Current version of the Spectator library.

Class Method Summary

Instance Method Summary

Macros inherited from module Spectator::DSL::Top

context(description, *tags, **metadata, &block) context, describe(description, *tags, **metadata, &block) describe, example_group(description, *tags, **metadata, &block) example_group

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 overridden 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 re-producible results even though random values are used. The seed for this random generator is controlled by ConfigBuilder.seed=.


[View source]