Minor changes to configure methods

This commit is contained in:
Michael Miller 2021-04-26 17:17:18 -06:00
parent 6c98d7107c
commit f549fcfa7a
No known key found for this signature in database
GPG Key ID: FB9F12F7C646A4AD
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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