mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Resolve issue trying to splat union of named tuples
This commit is contained in:
parent
85531fecf9
commit
ca85acefaf
2 changed files with 6 additions and 2 deletions
|
@ -14,6 +14,10 @@ module Spectator::Matchers
|
||||||
# Additional information from the match that can be used to debug the problem.
|
# Additional information from the match that can be used to debug the problem.
|
||||||
getter values : Array(Tuple(Symbol, String))
|
getter values : Array(Tuple(Symbol, String))
|
||||||
|
|
||||||
|
# Creates the match data.
|
||||||
|
def initialize(@failure_message, @values)
|
||||||
|
end
|
||||||
|
|
||||||
# Creates the match data.
|
# Creates the match data.
|
||||||
def initialize(@failure_message, **values)
|
def initialize(@failure_message, **values)
|
||||||
@values = values.to_a
|
@values = values.to_a
|
||||||
|
|
|
@ -27,7 +27,7 @@ module Spectator::Matchers
|
||||||
if match?(actual)
|
if match?(actual)
|
||||||
SuccessfulMatchData.new
|
SuccessfulMatchData.new
|
||||||
else
|
else
|
||||||
FailedMatchData.new(failure_message(actual), **values(actual))
|
FailedMatchData.new(failure_message(actual), values(actual).to_a)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ module Spectator::Matchers
|
||||||
if does_not_match?(actual)
|
if does_not_match?(actual)
|
||||||
SuccessfulMatchData.new
|
SuccessfulMatchData.new
|
||||||
else
|
else
|
||||||
FailedMatchData.new(failure_message_when_negated(actual), **negated_values(actual))
|
FailedMatchData.new(failure_message_when_negated(actual), negated_values(actual).to_a)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue