From 5c68e7eb52b3bb76738570add5f9dbf67c4280eb Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 26 Jan 2019 16:40:51 -0700 Subject: [PATCH] Create parameter-less initializer --- src/spectator/matchers/nil_matcher.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/spectator/matchers/nil_matcher.cr b/src/spectator/matchers/nil_matcher.cr index 7830d6b..b8b0da3 100644 --- a/src/spectator/matchers/nil_matcher.cr +++ b/src/spectator/matchers/nil_matcher.cr @@ -4,6 +4,11 @@ module Spectator::Matchers # Common matcher that tests whether a value is nil. # The values are compared with the `#nil?` method. struct NilMatcher < ConditionMatcher + # Creates the matcher. + def initialize + super("nil?") + end + # Determines whether the matcher is satisfied with the value given to it. # True is returned if the match was successful, false otherwise. def match?(partial : Expectations::ValueExpectationPartial(ActualType)) : Bool forall ActualType