From f549fcfa7a377bc60fdfa47eebfb9d3e4c3c1b3b Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Mon, 26 Apr 2021 17:17:18 -0600 Subject: [PATCH] Minor changes to configure methods --- src/spectator.cr | 2 +- src/spectator/spec/builder.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spectator.cr b/src/spectator.cr index 3dff022..88238a8 100644 --- a/src/spectator.cr +++ b/src/spectator.cr @@ -50,7 +50,7 @@ module Spectator # 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 : Nil + def configure(& : ConfigBuilder -> _) : Nil yield @@config_builder end diff --git a/src/spectator/spec/builder.cr b/src/spectator/spec/builder.cr index f9a4ced..63975c4 100644 --- a/src/spectator/spec/builder.cr +++ b/src/spectator/spec/builder.cr @@ -175,7 +175,7 @@ module Spectator # Builds the configuration to use for the spec. # A `ConfigBuilder` is yielded to the block provided to this method. # That builder will be used to create the configuration. - def config + def configure(& : ConfigBuilder -> _) : Nil builder = ConfigBuilder.new yield builder @config = builder.build