mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Merge branch 'master' into mock-redesign
This commit is contained in:
commit
0ea7890ece
7 changed files with 101 additions and 7 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 %}
|
||||
|
||||
|
|
|
@ -283,6 +283,12 @@ module Spectator
|
|||
|
||||
# Allow instance to behave like an example.
|
||||
forward_missing_to @example
|
||||
|
||||
# Constructs the full name or description of the example.
|
||||
# This prepends names of groups this example is part of.
|
||||
def to_s(io) : Nil
|
||||
@example.to_s(io)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue