shard-spectator/src/spectator/pass_result.cr
2021-01-30 20:07:36 -07:00

21 lines
427 B
Crystal

require "./result"
module Spectator
# Outcome that indicates running an example was successful.
class PassResult < Result
# Calls the `pass` method on *visitor*.
def accept(visitor)
visitor.pass
end
# Calls the `pass` method on *visitor*.
def accept(visitor)
visitor.pass(yield self)
end
# One-word description of the result.
def to_s(io)
io << "pass"
end
end
end