Tap::Summary added.

master
Luka Vandervelden 2020-11-24 00:46:37 +01:00
parent 6d1c189aed
commit f4bac4e09d
1 changed files with 13 additions and 0 deletions

View File

@ -27,7 +27,20 @@ class Tap::Entry
end
end
class Tap::Summary
property tests_passed = [] of Tap::Entry
property tests_failed = [] of Tap::Entry
def initialize(@tests_passed, @tests_failed)
end
end
class Tap::Suite < Array(Tap::Entry)
def summary
tests_passed = self.select(&.status.ok?)
tests_failed = self.select(&.status.not_ok?)
Summary.new tests_passed, tests_failed
end
end
module Tap