mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Default raise if stub is called without defintion
This commit is contained in:
parent
0528ddc2ab
commit
6b85bb7ed7
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,11 @@ module Spectator
|
|||
|
||||
private class Internal
|
||||
def {{definition.name.id}}({{definition.args.splat}})
|
||||
{{definition.block.body}}
|
||||
{% if definition.block.is_a?(Nop) %}
|
||||
raise "Stubbed method called without being allowed"
|
||||
{% else %}
|
||||
{{definition.block.body}}
|
||||
{% end %}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue