mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
16 lines
294 B
Crystal
16 lines
294 B
Crystal
# Spy class for testing `Spectator::Result#call`.
|
|
class ResultCallSpy
|
|
{% for name in %i[success failure error pending] %}
|
|
getter? {{name.id}} = false
|
|
|
|
def {{name.id}}
|
|
@{{name.id}} = true
|
|
{{name}}
|
|
end
|
|
|
|
def {{name.id}}(arg)
|
|
@{{name.id}} = true
|
|
arg
|
|
end
|
|
{% end %}
|
|
end
|