From aaf973b8cf5ce2b9d597f0852e86bfb9bb3167b4 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Wed, 19 Sep 2018 22:28:20 -0600 Subject: [PATCH] Concat #all_examples instead of recursive #add_examples --- src/spectator/example_group.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spectator/example_group.cr b/src/spectator/example_group.cr index 72be711..a97542a 100644 --- a/src/spectator/example_group.cr +++ b/src/spectator/example_group.cr @@ -95,12 +95,12 @@ module Spectator -> { inner.call(wrapper) } end - protected def add_examples(array : Array(Example)) + def add_examples(array : Array(Example)) @children.each do |child| if child.is_a?(ExampleFactory) array << child.build else - child.add_examples(array) + array.concat(child.all_examples) end end end