mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix sample iteration with single block arg (not tuple)
This commit is contained in:
parent
4e7318b964
commit
92e839415d
3 changed files with 43 additions and 3 deletions
|
@ -101,9 +101,15 @@ module Spectator::DSL
|
|||
)
|
||||
|
||||
\{% if block %}
|
||||
\{% for arg, i in block.args %}
|
||||
let(\{{arg}}) do |example|
|
||||
example.group.as(::Spectator::ExampleGroupIteration(typeof(Group\%group.\%collection.first))).item[\{{i}}]
|
||||
\{% if block.args.size > 1 %}
|
||||
\{% for arg, i in block.args %}
|
||||
let(\{{arg}}) do |example|
|
||||
example.group.as(::Spectator::ExampleGroupIteration(typeof(Group\%group.\%collection.first))).item[\{{i}}]
|
||||
end
|
||||
\{% end %}
|
||||
\{% else %}
|
||||
let(\{{block.args[0]}}) do |example|
|
||||
example.group.as(::Spectator::ExampleGroupIteration(typeof(Group\%group.\%collection.first))).item
|
||||
end
|
||||
\{% end %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue