mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Remove elapsed time from pending results
This commit is contained in:
parent
577877e067
commit
493e30acee
4 changed files with 1 additions and 15 deletions
|
@ -36,10 +36,4 @@ describe Spectator::PendingResult do
|
|||
result.example.should eq(example)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#elapsed" do
|
||||
it "is zero" do
|
||||
new_pending_result.elapsed.should eq(Time::Span.zero)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -148,7 +148,7 @@ describe Spectator::Runner do
|
|||
spy = SpyFormatter.new
|
||||
runner = Spectator::Runner.new(suite, spectator_test_config(spy))
|
||||
max_time = Time.measure { runner.run }
|
||||
min_time = spy.end_example_calls.sum(&.elapsed)
|
||||
min_time = spy.end_example_calls.each.map(&.as(Spectator::FinishedResult)).sum(&.elapsed)
|
||||
report = spy.end_suite_calls.first
|
||||
report.runtime.should be <= max_time
|
||||
report.runtime.should be >= min_time
|
||||
|
|
|
@ -5,11 +5,6 @@ module Spectator
|
|||
# A pending result means the example is not ready to run yet.
|
||||
# This can happen when the functionality to be tested is not implemented yet.
|
||||
class PendingResult < Result
|
||||
# Length of time it took to run the example.
|
||||
def elapsed : Time::Span
|
||||
Time::Span.zero
|
||||
end
|
||||
|
||||
# Indicates that an example was run and it was successful.
|
||||
# NOTE: Examples with warnings count as successful.
|
||||
# This will always be false for this type of result.
|
||||
|
|
|
@ -5,9 +5,6 @@ module Spectator
|
|||
# Example that was run that this result is for.
|
||||
getter example : Example
|
||||
|
||||
# Length of time it took to run the example.
|
||||
abstract def elapsed : Time::Span
|
||||
|
||||
# Indicates that an example was run and it was successful.
|
||||
# NOTE: Examples with warnings count as successful.
|
||||
abstract def passed? : Bool
|
||||
|
|
Loading…
Reference in a new issue