mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use index offset argument
This commit is contained in:
parent
1addc46f7e
commit
1e2f3f7c66
1 changed files with 5 additions and 5 deletions
|
@ -23,8 +23,8 @@ module Spectator::Formatting
|
||||||
|
|
||||||
io.puts "Pending:"
|
io.puts "Pending:"
|
||||||
io.puts
|
io.puts
|
||||||
examples.each_with_index do |example, index|
|
examples.each_with_index(1) do |example, index|
|
||||||
io.puts Components::PendingBlock.new(example, index + 1)
|
io.puts Components::PendingBlock.new(example, index)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ module Spectator::Formatting
|
||||||
|
|
||||||
io.puts "Failures:"
|
io.puts "Failures:"
|
||||||
io.puts
|
io.puts
|
||||||
examples.each_with_index do |example, index|
|
examples.each_with_index(1) do |example, index|
|
||||||
if result = example.result.as?(ErrorResult)
|
if result = example.result.as?(ErrorResult)
|
||||||
io.puts Components::ErrorResultBlock.new(index + 1, example, result)
|
io.puts Components::ErrorResultBlock.new(index, example, result)
|
||||||
elsif result = example.result.as?(FailResult)
|
elsif result = example.result.as?(FailResult)
|
||||||
io.puts Components::FailResultBlock.new(index + 1, example, result)
|
io.puts Components::FailResultBlock.new(index, example, result)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue