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
|
class ErrorResult < FailResult
|
||||||
# Calls the `error` method on *visitor*.
|
# Calls the `error` method on *visitor*.
|
||||||
def accept(visitor)
|
def accept(visitor)
|
||||||
visitor.error
|
visitor.error(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Calls the `error` method on *visitor*.
|
# Calls the `error` method on *visitor*.
|
||||||
|
|
|
@ -17,7 +17,7 @@ module Spectator
|
||||||
|
|
||||||
# Calls the `failure` method on *visitor*.
|
# Calls the `failure` method on *visitor*.
|
||||||
def accept(visitor)
|
def accept(visitor)
|
||||||
visitor.fail
|
visitor.fail(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Calls the `failure` method on *visitor*.
|
# Calls the `failure` method on *visitor*.
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Spectator
|
||||||
class PassResult < Result
|
class PassResult < Result
|
||||||
# Calls the `pass` method on *visitor*.
|
# Calls the `pass` method on *visitor*.
|
||||||
def accept(visitor)
|
def accept(visitor)
|
||||||
visitor.pass
|
visitor.pass(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Calls the `pass` method on *visitor*.
|
# Calls the `pass` method on *visitor*.
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Spectator
|
||||||
|
|
||||||
# Calls the `pending` method on the *visitor*.
|
# Calls the `pending` method on the *visitor*.
|
||||||
def accept(visitor)
|
def accept(visitor)
|
||||||
visitor.pending
|
visitor.pending(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Calls the `pending` method on the *visitor*.
|
# Calls the `pending` method on the *visitor*.
|
||||||
|
|
|
@ -49,22 +49,22 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
# Invokes the example passed method.
|
# Invokes the example passed method.
|
||||||
def pass
|
def pass(_result)
|
||||||
@formatter.example_passed(@notification)
|
@formatter.example_passed(@notification)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Invokes the example failed method.
|
# Invokes the example failed method.
|
||||||
def fail
|
def fail(_result)
|
||||||
@formatter.example_failed(@notification)
|
@formatter.example_failed(@notification)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Invokes the example error method.
|
# Invokes the example error method.
|
||||||
def error
|
def error(_result)
|
||||||
@formatter.example_error(@notification)
|
@formatter.example_error(@notification)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Invokes the example pending method.
|
# Invokes the example pending method.
|
||||||
def pending
|
def pending(_result)
|
||||||
@formatter.example_pending(@notification)
|
@formatter.example_pending(@notification)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue