Implement #to_not

This commit is contained in:
Michael Miller 2018-08-30 14:15:07 -06:00
parent 5eb5561e61
commit a65aedbfb7

View file

@ -16,5 +16,16 @@ module Spectator
raise ExpectationFailedError.new
end
end
def to_not(matcher : Matchers::Matcher)
if matcher.match?(self)
raise ExpectationFailedError.new
end
end
@[AlwaysInline]
def not_to(matcher : Matchers::Matcher)
to_not(matcher)
end
end
end