mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Result visitor methods should take result as argument
This commit is contained in:
parent
9a62c1386a
commit
59c67c26a9
5 changed files with 8 additions and 8 deletions
|
@ -7,7 +7,7 @@ module Spectator
|
|||
class ErrorResult < FailResult
|
||||
# Calls the `error` method on *visitor*.
|
||||
def accept(visitor)
|
||||
visitor.error
|
||||
visitor.error(self)
|
||||
end
|
||||
|
||||
# Calls the `error` method on *visitor*.
|
||||
|
|
|
@ -17,7 +17,7 @@ module Spectator
|
|||
|
||||
# Calls the `failure` method on *visitor*.
|
||||
def accept(visitor)
|
||||
visitor.fail
|
||||
visitor.fail(self)
|
||||
end
|
||||
|
||||
# Calls the `failure` method on *visitor*.
|
||||
|
|
|
@ -5,7 +5,7 @@ module Spectator
|
|||
class PassResult < Result
|
||||
# Calls the `pass` method on *visitor*.
|
||||
def accept(visitor)
|
||||
visitor.pass
|
||||
visitor.pass(self)
|
||||
end
|
||||
|
||||
# Calls the `pass` method on *visitor*.
|
||||
|
|
|
@ -13,7 +13,7 @@ module Spectator
|
|||
|
||||
# Calls the `pending` method on the *visitor*.
|
||||
def accept(visitor)
|
||||
visitor.pending
|
||||
visitor.pending(self)
|
||||
end
|
||||
|
||||
# Calls the `pending` method on the *visitor*.
|
||||
|
|
|
@ -49,22 +49,22 @@ module Spectator
|
|||
end
|
||||
|
||||
# Invokes the example passed method.
|
||||
def pass
|
||||
def pass(_result)
|
||||
@formatter.example_passed(@notification)
|
||||
end
|
||||
|
||||
# Invokes the example failed method.
|
||||
def fail
|
||||
def fail(_result)
|
||||
@formatter.example_failed(@notification)
|
||||
end
|
||||
|
||||
# Invokes the example error method.
|
||||
def error
|
||||
def error(_result)
|
||||
@formatter.example_error(@notification)
|
||||
end
|
||||
|
||||
# Invokes the example pending method.
|
||||
def pending
|
||||
def pending(_result)
|
||||
@formatter.example_pending(@notification)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue