mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add spec for Report and fix some bugs
This commit is contained in:
parent
600c9fbde1
commit
f19b33d7a2
2 changed files with 150 additions and 2 deletions
|
@ -18,7 +18,7 @@ module Spectator
|
|||
|
||||
# Number of passing examples.
|
||||
def successful_count
|
||||
@results.count(&.successful?)
|
||||
@results.count(&.passed?)
|
||||
end
|
||||
|
||||
# Number of failing examples (includes errors).
|
||||
|
@ -50,7 +50,13 @@ module Spectator
|
|||
# This does not include hooks,
|
||||
# but it does include pre- and post-conditions.
|
||||
def example_runtime
|
||||
@results.map(&.elapsed).sum
|
||||
@results.sum do |result|
|
||||
if result.is_a?(FinishedResult)
|
||||
result.elapsed
|
||||
else
|
||||
Time::Span.zero
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Length of time spent in framework processes and hooks.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue