mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add tests for Result#call implementations
This commit is contained in:
parent
75f9a5838b
commit
6a8d447570
5 changed files with 70 additions and 0 deletions
10
spec/helpers/result_call_spy.cr
Normal file
10
spec/helpers/result_call_spy.cr
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue