Switch to run-time error for unsupported negation

This commit is contained in:
Michael Miller 2019-11-16 13:18:09 -07:00
parent 201fe614d1
commit f0bfd8b6d4

View file

@ -66,7 +66,7 @@ module Spectator::Matchers
# The message should typically only contain the test expression labels.
# Actual values should be returned by `#values`.
private def failure_message_when_negated(actual : TestExpression(T)) : String forall T
{% raise "Negation with #{@type.name} is not supported." %}
raise "Negation with #{self.class} is not supported."
end
# Checks whether the matcher is satisifed with the expression given to it.