mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Implement fail-fast in runner
Report tracks number of omitted tests due to abort.
This commit is contained in:
parent
9e63c20df2
commit
a31d5c8b5b
4 changed files with 82 additions and 7 deletions
|
@ -71,6 +71,15 @@ describe Spectator::Report do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#remaining_count" do
|
||||
it "is the expected value" do
|
||||
results = [] of Spectator::Result
|
||||
remaining = 5
|
||||
report = Spectator::Report.new(results, Time::Span.zero, remaining)
|
||||
report.remaining_count.should eq(remaining)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#failed?" do
|
||||
context "with a failed test suite" do
|
||||
it "is true" do
|
||||
|
@ -87,6 +96,24 @@ describe Spectator::Report do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#remaining?" do
|
||||
context "with remaining tests" do
|
||||
it "is true" do
|
||||
results = [] of Spectator::Result
|
||||
report = Spectator::Report.new(results, Time::Span.zero, 5)
|
||||
report.remaining?.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
context "without remaining tests" do
|
||||
it "is false" do
|
||||
results = [] of Spectator::Result
|
||||
report = Spectator::Report.new(results, Time::Span.zero, 0)
|
||||
report.remaining?.should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#failures" do
|
||||
it "returns the expected results" do
|
||||
results = Array.new(5) { new_failure_result.as(Spectator::Result) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue