Add missing description arguments

This commit is contained in:
Michael Miller 2020-01-04 09:32:56 -07:00
parent 7f8d9d5ef3
commit 4c9d767137

View file

@ -25,9 +25,9 @@ module Spectator::Matchers
def match(actual : TestExpression(T)) : MatchData forall T
snapshot = snapshot_values(actual.value)
if match?(snapshot)
SuccessfulMatchData.new
SuccessfulMatchData.new(description)
else
FailedMatchData.new("#{actual.label} does not have #{expected.label}", **values(snapshot))
FailedMatchData.new(description, "#{actual.label} does not have #{expected.label}", **values(snapshot))
end
end
@ -36,9 +36,9 @@ module Spectator::Matchers
def negated_match(actual : TestExpression(T)) : MatchData forall T
snapshot = snapshot_values(actual.value)
if match?(snapshot)
FailedMatchData.new("#{actual.label} has #{expected.label}", **values(snapshot))
FailedMatchData.new(description, "#{actual.label} has #{expected.label}", **values(snapshot))
else
SuccessfulMatchData.new
SuccessfulMatchData.new(description)
end
end