mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix possible shadowing of mock
This commit is contained in:
parent
6e57a1c44a
commit
bb0c85d9ec
1 changed files with 4 additions and 4 deletions
|
@ -286,10 +286,10 @@ module Spectator::DSL
|
||||||
found_tuple = found_tuples.last %}
|
found_tuple = found_tuples.last %}
|
||||||
|
|
||||||
{% if found_tuple %}
|
{% 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 %}
|
{% for key, value in value_methods %}
|
||||||
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
|
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
|
||||||
mock._spectator_define_stub(%stub{key})
|
%mock._spectator_define_stub(%stub{key})
|
||||||
{% end %}
|
{% end %}
|
||||||
end
|
end
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -362,10 +362,10 @@ module Spectator::DSL
|
||||||
found_tuple = found_tuples.last %}
|
found_tuple = found_tuples.last %}
|
||||||
|
|
||||||
{% if found_tuple %}
|
{% if found_tuple %}
|
||||||
{{found_tuple[2].id}}.tap do |mock|
|
{{found_tuple[2].id}}.tap do |%mock|
|
||||||
{% for key, value in value_methods %}
|
{% for key, value in value_methods %}
|
||||||
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
|
%stub{key} = ::Spectator::ValueStub.new({{key.id.symbolize}}, {{value}})
|
||||||
mock._spectator_define_stub(%stub{key})
|
%mock._spectator_define_stub(%stub{key})
|
||||||
{% end %}
|
{% end %}
|
||||||
end
|
end
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue