mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add Ameba and address code linting issues
This commit is contained in:
parent
99926c775e
commit
53bfcc25ef
16 changed files with 33 additions and 32 deletions
|
@ -95,7 +95,7 @@ module Spectator
|
|||
offset = index
|
||||
# Loop through each child
|
||||
# until one is found to contain the index.
|
||||
child = children.each do |child|
|
||||
found = children.each do |child|
|
||||
count = child.example_count
|
||||
# Example groups consider their range to be [0, example_count).
|
||||
# Each child is offset by the total example count of the previous children.
|
||||
|
@ -114,7 +114,7 @@ module Spectator
|
|||
# Otherwise, the indexer repeats the process for the next child.
|
||||
# It should be impossible to get nil here,
|
||||
# provided the bounds check and example counts are correct.
|
||||
child.not_nil![offset]
|
||||
found.not_nil![offset]
|
||||
end
|
||||
|
||||
# Checks whether all examples in the group have been run.
|
||||
|
|
|
@ -35,7 +35,7 @@ module Spectator::Formatting
|
|||
|
||||
days = hours / 24
|
||||
hours %= 24
|
||||
return sprintf("%i days %i:%02i:%02i", days, hours, minutes, int_seconds)
|
||||
sprintf("%i days %i:%02i:%02i", days, hours, minutes, int_seconds)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,8 +11,8 @@ module Spectator::Matchers
|
|||
values = ExpectedActual.new(expected, label, actual, partial.label)
|
||||
if values.expected.size == values.actual.size
|
||||
index = 0
|
||||
values.expected.zip(values.actual) do |expected, actual|
|
||||
return ContentMatchData.new(index, values) unless expected == actual
|
||||
values.expected.zip(values.actual) do |expected, element|
|
||||
return ContentMatchData.new(index, values) unless expected == element
|
||||
index += 1
|
||||
end
|
||||
IdenticalMatchData.new(values)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue