Fix paths and references

This commit is contained in:
Michael Miller 2021-05-08 23:46:19 -06:00
parent 7294f2da67
commit 72b2e7ebcb
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
4 changed files with 8 additions and 12 deletions

View file

@ -43,14 +43,14 @@ module Spectator
exit(1) if autorun? && !run
end
@@config_builder = ConfigBuilder.new
@@config_builder = Config::Builder.new
@@config : Config?
# 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.
def configure(& : ConfigBuilder -> _) : Nil
def configure(& : Config::Builder -> _) : Nil
yield @@config_builder
end

View file

@ -1,7 +1,7 @@
require "../composite_example_filter"
require "../example_filter"
require "../formatting"
require "../null_example_filter"
require "../reporters"
require "../run_flags"
module Spectator
@ -53,6 +53,7 @@ module Spectator
when .one? then formatters.first
else Formatting::BroadcastFormatter.new(formatters)
end
end
# Enables fail-fast mode.
def fail_fast

View file

@ -7,11 +7,8 @@
require "./abstract_expression"
require "./anything"
require "./block"
require "./command_line_arguments_config_source"
require "./composite_example_filter"
require "./config_builder"
require "./config"
require "./config_source"
require "./context"
require "./context_delegate"
require "./context_method"
@ -52,6 +49,5 @@ require "./result"
require "./spec"
require "./tags"
require "./test_context"
require "./test_suite"
require "./value"
require "./wrapper"

View file

@ -1,5 +1,4 @@
require "../config"
require "../config_builder"
require "../example"
require "../example_context_method"
require "../example_group"
@ -173,10 +172,10 @@ module Spectator
end
# Builds the configuration to use for the spec.
# A `ConfigBuilder` is yielded to the block provided to this method.
# A `Config::Builder` is yielded to the block provided to this method.
# That builder will be used to create the configuration.
def configure(& : ConfigBuilder -> _) : Nil
builder = ConfigBuilder.new
def configure(& : Config::Builder -> _) : Nil
builder = Config::Builder.new
yield builder
@config = builder.build
end
@ -206,7 +205,7 @@ module Spectator
# Retrieves the configuration.
# If one wasn't previously set, a default configuration is used.
private def config : Config
@config || ConfigBuilder.default
@config || Config.default
end
end
end