shard-spectator/spec/helpers/result_call_spy.cr

11 lines
237 B
Crystal
Raw Normal View History

# 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