mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change order of pending result parameters
This commit is contained in:
parent
3b1db7b772
commit
b43b09f46d
3 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ module Spectator
|
|||
|
||||
# Result of the last time the example ran.
|
||||
# Is pending if the example hasn't run.
|
||||
getter result : Result = PendingResult.new(Time::Span::ZERO, "Example not run")
|
||||
getter result : Result = PendingResult.new("Example not run")
|
||||
|
||||
# Creates the example.
|
||||
# An instance to run the test code in is given by *context*.
|
||||
|
@ -89,7 +89,7 @@ module Spectator
|
|||
if pending?
|
||||
Log.debug { "Skipping example #{self} - marked pending" }
|
||||
@finished = true
|
||||
return @result = PendingResult.new(Time::Span::ZERO, tags[:pending] || "No reason given")
|
||||
return @result = PendingResult.new(tags[:pending] || "No reason given")
|
||||
end
|
||||
|
||||
previous_example = @@current
|
||||
|
|
|
@ -121,7 +121,7 @@ module Spectator
|
|||
when ExpectationFailed
|
||||
FailResult.new(elapsed, error, @expectations)
|
||||
when ExamplePending
|
||||
PendingResult.new(elapsed, error.message || "No reason given", @expectations)
|
||||
PendingResult.new(error.message || "No reason given", elapsed, @expectations)
|
||||
else
|
||||
ErrorResult.new(elapsed, error, @expectations)
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ module Spectator
|
|||
# Creates the result.
|
||||
# *elapsed* is the length of time it took to run the example.
|
||||
# A *reason* for the skip/pending result can be specified.
|
||||
def initialize(elapsed = Time::Span::ZERO, @reason = "No reason given", expectations = [] of Expectation)
|
||||
def initialize(@reason = "No reason given", elapsed = Time::Span::ZERO, expectations = [] of Expectation)
|
||||
super(elapsed, expectations)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue