From 5d95e1b5dd7e3306b2d7b8fa48db605a3a9ab615 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 23 Mar 2019 18:35:15 -0600 Subject: [PATCH] Save built-up config --- src/spectator.cr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/spectator.cr b/src/spectator.cr index 4772128..ee20adf 100644 --- a/src/spectator.cr +++ b/src/spectator.cr @@ -77,6 +77,7 @@ module Spectator end @@config_builder = ConfigBuilder.new + @@config : Config? # Provides a means to configure how Spectator will run and report tests. # 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. private def config + @@config ||= build_config + end + + # Builds the configuration. + private def build_config # Build up the configuration from various sources. # The sources that take priority are later in the list. apply_config_file