Fix possible shadowing of `mock`
This commit is contained in:
parent
6e57a1c44a
commit
bb0c85d9ec
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue