mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix missing keyword arguments after splat
This commit is contained in:
parent
a31ffe3fa3
commit
4dacaab6dc
2 changed files with 7 additions and 3 deletions
|
@ -11,7 +11,7 @@ Spectator.describe "Mock DSL", :smoke do
|
||||||
args[1].as(Int32),
|
args[1].as(Int32),
|
||||||
args[2].as(Int32),
|
args[2].as(Int32),
|
||||||
},
|
},
|
||||||
args[3].as(Int32),
|
args[:kwarg].as(Int32),
|
||||||
{
|
{
|
||||||
x: args[:x].as(Int32),
|
x: args[:x].as(Int32),
|
||||||
y: args[:y].as(Int32),
|
y: args[:y].as(Int32),
|
||||||
|
|
|
@ -145,7 +145,9 @@ module Spectator
|
||||||
{% for arg, i in method.args %}{% if !method.splat_index || i < method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
{% for arg, i in method.args %}{% if !method.splat_index || i < method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
||||||
),
|
),
|
||||||
{% if method.splat_index && (splat = method.args[method.splat_index].internal_name) %}{{splat.symbolize}}, {{splat}},{% end %}
|
{% if method.splat_index && (splat = method.args[method.splat_index].internal_name) %}{{splat.symbolize}}, {{splat}},{% end %}
|
||||||
{{method.double_splat}}
|
::NamedTuple.new(
|
||||||
|
{% for arg, i in method.args %}{% if method.splat_index && i > method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
||||||
|
).merge({{method.double_splat}})
|
||||||
)
|
)
|
||||||
%call = ::Spectator::MethodCall.new({{method.name.symbolize}}, %args)
|
%call = ::Spectator::MethodCall.new({{method.name.symbolize}}, %args)
|
||||||
_spectator_record_call(%call)
|
_spectator_record_call(%call)
|
||||||
|
@ -245,7 +247,9 @@ module Spectator
|
||||||
{% for arg, i in method.args %}{% if !method.splat_index || i < method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
{% for arg, i in method.args %}{% if !method.splat_index || i < method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
||||||
),
|
),
|
||||||
{% if method.splat_index && (splat = method.args[method.splat_index].internal_name) %}{{splat.symbolize}}, {{splat}},{% end %}
|
{% if method.splat_index && (splat = method.args[method.splat_index].internal_name) %}{{splat.symbolize}}, {{splat}},{% end %}
|
||||||
{{method.double_splat}}
|
::NamedTuple.new(
|
||||||
|
{% for arg, i in method.args %}{% if method.splat_index && i > method.splat_index %}{{arg.internal_name.stringify}}: {{arg.internal_name}}, {% end %}{% end %}
|
||||||
|
).merge({{method.double_splat}})
|
||||||
)
|
)
|
||||||
%call = ::Spectator::MethodCall.new({{method.name.symbolize}}, %args)
|
%call = ::Spectator::MethodCall.new({{method.name.symbolize}}, %args)
|
||||||
_spectator_record_call(%call)
|
_spectator_record_call(%call)
|
||||||
|
|
Loading…
Reference in a new issue