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