From f02e1acb3b37422fc0a9d41f1457291a8de32f86 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 29 May 2021 18:35:01 -0600 Subject: [PATCH] Remove lazy iteration Fixes issue with empty? method eating the first example for failure and pending lists. --- src/spectator/report.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spectator/report.cr b/src/spectator/report.cr index 9168848..fb69dde 100644 --- a/src/spectator/report.cr +++ b/src/spectator/report.cr @@ -69,12 +69,12 @@ module Spectator # Returns a collection of all failed examples. def failures - @examples.each.select(&.result.fail?) + @examples.select(&.result.fail?) end # Returns a collection of all pending (skipped) examples. def pending - @examples.each.select(&.result.pending?) + @examples.select(&.result.pending?) end # Length of time it took to run just example code.