mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix for no block arg in #given - "value" treated as StringLiteral
This commit is contained in:
parent
b1d44fb480
commit
65da494e52
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ module Spectator
|
|||
|
||||
macro given(collection, &block)
|
||||
context({{collection}}, "Given") do
|
||||
{% var_name = block.args.empty? ? "value" : block.args.first %}
|
||||
{% var_name = block.args.empty? ? "value".id : block.args.first %}
|
||||
{% if GIVEN_VARIABLES.find { |v| v[0].id == var_name.id } %}
|
||||
{% raise "Duplicate given variable name \"#{var_name.id}\"" %}
|
||||
{% end %}
|
||||
|
|
Loading…
Reference in a new issue