Forward build method

This commit is contained in:
Michael Miller 2020-09-26 22:25:04 -06:00
parent 4567162459
commit 543df88d39
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436

View file

@ -33,5 +33,14 @@ module Spectator::DSL
def add_example(*args, &block : Example, Context ->)
@@builder.add_example(*args, &block)
end
# Constructs the test spec.
# Returns the spec instance.
#
# Raises an error if there were not symmetrical calls to `#start_group` and `#end_group`.
# This would indicate a logical error somewhere in Spectator or an extension of it.
def build : Spec
@@builder.build
end
end
end