mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Update specs for new Result#call functionality
This commit is contained in:
parent
002c1d892b
commit
919e2b96f6
5 changed files with 136 additions and 38 deletions
|
@ -1,10 +1,16 @@
|
|||
# Spy class for testing `Spectator::Result#call`.
|
||||
class ResultCallSpy
|
||||
{% for name in %i[success failure error pending] %}
|
||||
getter! {{name.id}} : ::Spectator::Result
|
||||
getter? {{name.id}} = false
|
||||
|
||||
def {{name.id}}
|
||||
@{{name.id}} = true
|
||||
{{name}}
|
||||
end
|
||||
|
||||
def {{name.id}}(arg)
|
||||
@{{name.id}} = arg
|
||||
@{{name.id}} = true
|
||||
arg
|
||||
end
|
||||
{% end %}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue