Fix locals not being passed to child groups

This commit is contained in:
Michael Miller 2018-09-21 14:26:09 -06:00
parent a9d4acda36
commit 66ca06337d
3 changed files with 3 additions and 3 deletions

View file

@ -167,7 +167,7 @@ module Spectator
end end
class Factory%example < ::Spectator::ExampleFactory class Factory%example < ::Spectator::ExampleFactory
def build(locals = {} of Symbol => ValueWrapper) def build(locals : Hash(Symbol, ValueWrapper))
Example%example.new(locals) Example%example.new(locals)
end end
end end

View file

@ -1,5 +1,5 @@
module Spectator module Spectator
abstract class ExampleFactory abstract class ExampleFactory
abstract def build : Example abstract def build(locals : Hash(Symbol, ValueWrapper)) : Example
end end
end end

View file

@ -42,7 +42,7 @@ module Spectator
if child.is_a?(ExampleFactory) if child.is_a?(ExampleFactory)
array << child.build(locals) array << child.build(locals)
else else
array.concat(child.all_examples) array.concat(child.all_examples(locals))
end end
end end
end end