Add tests for Result#call implementations

This commit is contained in:
Michael Miller 2019-02-17 14:40:05 -07:00
parent 75f9a5838b
commit 6a8d447570
5 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,10 @@
# 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