Group builder needs "what" as first arg

This commit is contained in:
Michael Miller 2018-09-23 12:15:53 -06:00
parent 0999cb2dbc
commit 09184f4a2a
2 changed files with 4 additions and 1 deletions

View file

@ -3,7 +3,7 @@ module Spectator
module Builder
extend self
@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new]
@group_stack = [::Spectator::DSL::ExampleGroupBuilder.new("ROOT")]
private def current_group
@group_stack.last

View file

@ -8,6 +8,9 @@ module Spectator
@after_each_hooks = [] of ->
@around_each_hooks = [] of Proc(Nil) ->
def initialize(@what : String)
end
def add_child(child : ExampleFactory | ExampleGroupBuilder) : Nil
@children << child
end