Handle injecting stubbed abstract method

This commit is contained in:
Michael Miller 2022-03-19 12:33:09 -06:00
parent 9091b8d027
commit 25f546245a
No known key found for this signature in database
GPG Key ID: AC78B32D30CE34A2
1 changed files with 6 additions and 2 deletions

View File

@ -270,8 +270,12 @@ module Spectator
# Utility for defining a stubbed method and a fallback.
private macro inject_stub(method)
{{method}}
stub {{method}}
{% if method.abstract? %}
abstract_stub {{method}}
{% else %}
{{method}}
stub {{method}}
{% end %}
end
# Redefines all methods on a type to conditionally respond to messages.