shard-spectator/spec/helpers/result_call_spy.cr
2019-02-17 14:40:05 -07:00

10 lines
237 B
Crystal

# Spy class for testing `Spectator::Result#call`.
class ResultCallSpy
{% for name in %i[success failure error pending] %}
getter! {{name.id}} : ::Spectator::Result
def {{name.id}}(arg)
@{{name.id}} = arg
end
{% end %}
end