Tap::Summary added.
parent
6d1c189aed
commit
f4bac4e09d
13
src/tap.cr
13
src/tap.cr
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue