From 98f886d9d45824f0f838d982a5a947c2adb377e0 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 12 Sep 2020 16:02:11 -0600 Subject: [PATCH] Implement finished? method --- src/spectator/example_group.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/spectator/example_group.cr b/src/spectator/example_group.cr index 82bbbfa..80b6672 100644 --- a/src/spectator/example_group.cr +++ b/src/spectator/example_group.cr @@ -22,6 +22,11 @@ module Spectator @nodes.each { |node| yield node } end + # Checks if all examples and sub-groups have finished. + def finished? : Bool + @nodes.all?(&.finished?) + end + # Adds the specified *node* to the group. # Assigns the node to this group. # If the node already belongs to a group,