Save built-up config

This commit is contained in:
Michael Miller 2019-03-23 18:35:15 -06:00
parent 57271d5f4b
commit 5d95e1b5dd

View file

@ -77,6 +77,7 @@ module Spectator
end end
@@config_builder = ConfigBuilder.new @@config_builder = ConfigBuilder.new
@@config : Config?
# Provides a means to configure how Spectator will run and report tests. # Provides a means to configure how Spectator will run and report tests.
# A `ConfigBuilder` is yielded to allow changing the configuration. # A `ConfigBuilder` is yielded to allow changing the configuration.
@ -103,6 +104,11 @@ module Spectator
# Processes and builds up a configuration to use for running tests. # Processes and builds up a configuration to use for running tests.
private def config private def config
@@config ||= build_config
end
# Builds the configuration.
private def build_config
# Build up the configuration from various sources. # Build up the configuration from various sources.
# The sources that take priority are later in the list. # The sources that take priority are later in the list.
apply_config_file apply_config_file