Fix possible shadowing of `mock`

This commit is contained in:
Michael Miller 2022-07-12 19:50:04 -06:00
parent 6e57a1c44a
commit bb0c85d9ec
No known key found for this signature in database
GPG Key ID: 32B47AE8F388A1FF
1 changed files with 4 additions and 4 deletions

View File

@ -286,10 +286,10 @@ module Spectator::DSL
found_tuple = found_tuples.last %}
{% if found_tuple %}
{{found_tuple[2].id}}.new.tap do |mock|
{{found_tuple[2].id}}.new.tap do |%mock|
{% for key, value in value_methods %}
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
mock._spectator_define_stub(%stub{key})
%mock._spectator_define_stub(%stub{key})
{% end %}
end
{% else %}
@ -362,10 +362,10 @@ module Spectator::DSL
found_tuple = found_tuples.last %}
{% if found_tuple %}
{{found_tuple[2].id}}.tap do |mock|
{{found_tuple[2].id}}.tap do |%mock|
{% for key, value in value_methods %}
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
mock._spectator_define_stub(%stub{key})
%mock._spectator_define_stub(%stub{key})
{% end %}
end
{% else %}