Remove lazy iteration

Fixes issue with empty? method eating the first example for failure and 
pending lists.
This commit is contained in:
Michael Miller 2021-05-29 18:35:01 -06:00
parent 5e1ca34146
commit f02e1acb3b
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -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.