Create parameter-less initializer

This commit is contained in:
Michael Miller 2019-01-26 16:40:51 -07:00
parent c3d7aef7a9
commit 5c68e7eb52

View file

@ -4,6 +4,11 @@ module Spectator::Matchers
# Common matcher that tests whether a value is nil. # Common matcher that tests whether a value is nil.
# The values are compared with the `#nil?` method. # The values are compared with the `#nil?` method.
struct NilMatcher < ConditionMatcher struct NilMatcher < ConditionMatcher
# Creates the matcher.
def initialize
super("nil?")
end
# Determines whether the matcher is satisfied with the value given to it. # Determines whether the matcher is satisfied with the value given to it.
# True is returned if the match was successful, false otherwise. # True is returned if the match was successful, false otherwise.
def match?(partial : Expectations::ValueExpectationPartial(ActualType)) : Bool forall ActualType def match?(partial : Expectations::ValueExpectationPartial(ActualType)) : Bool forall ActualType