Distinguish group variables

This commit is contained in:
Michael Miller 2019-09-22 11:02:53 -06:00
parent 24eb5e419a
commit 5f3c9d2f63

View file

@ -6,9 +6,9 @@ module Spectator::SpecBuilder
def initialize(@what : String | Symbol)
end
def build(group)
context = TestContext.new(group.context, build_hooks)
NestedExampleGroup.new(@what, group, context).tap do |group|
def build(parent_group)
context = TestContext.new(parent_group.context, build_hooks)
NestedExampleGroup.new(@what, parent_group, context).tap do |group|
group.children = children.map do |child|
child.build(group).as(ExampleComponent)
end