diff --git a/src/spectator/dsl/structure_dsl.cr b/src/spectator/dsl/structure_dsl.cr index f864825..f460f35 100644 --- a/src/spectator/dsl/structure_dsl.cr +++ b/src/spectator/dsl/structure_dsl.cr @@ -167,7 +167,7 @@ module Spectator end class Factory%example < ::Spectator::ExampleFactory - def build(locals = {} of Symbol => ValueWrapper) + def build(locals : Hash(Symbol, ValueWrapper)) Example%example.new(locals) end end diff --git a/src/spectator/example_factory.cr b/src/spectator/example_factory.cr index f7ccef3..ace54f1 100644 --- a/src/spectator/example_factory.cr +++ b/src/spectator/example_factory.cr @@ -1,5 +1,5 @@ module Spectator abstract class ExampleFactory - abstract def build : Example + abstract def build(locals : Hash(Symbol, ValueWrapper)) : Example end end diff --git a/src/spectator/example_group.cr b/src/spectator/example_group.cr index b7370fb..533f47c 100644 --- a/src/spectator/example_group.cr +++ b/src/spectator/example_group.cr @@ -42,7 +42,7 @@ module Spectator if child.is_a?(ExampleFactory) array << child.build(locals) else - array.concat(child.all_examples) + array.concat(child.all_examples(locals)) end end end