Literally inject stubs from double block

This commit is contained in:
Michael Miller 2022-03-19 12:28:00 -06:00
parent 5a4e95e8a2
commit 9091b8d027
No known key found for this signature in database
GPG key ID: AC78B32D30CE34A2
2 changed files with 78 additions and 24 deletions

View file

@ -49,7 +49,16 @@ module Spectator
{{value}}
end
{% end %}
{% if block %}{{block.body}}{% end %}
{% if block %}{% block.body %}
{% for expr in block.body.is_a?(Expressions) ? block.body.expressions : [block.body] %}
{% if expr.is_a?(Call) && expr.name == :stub.id %}
inject_{{expr}}
{% else %}
{{expr}}
{% end %}
{% end %}
{% end %}
end
end