diff --git a/src/spectator/spec_builder/nested_example_group_builder.cr b/src/spectator/spec_builder/nested_example_group_builder.cr index 413e032..002629b 100644 --- a/src/spectator/spec_builder/nested_example_group_builder.cr +++ b/src/spectator/spec_builder/nested_example_group_builder.cr @@ -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