From 840da3a8b7ef9721d96c53d541a5f6127c373f8b Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 26 Jan 2019 16:26:26 -0700 Subject: [PATCH] Derive type matcher from condition matcher --- src/spectator/matchers/type_matcher.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spectator/matchers/type_matcher.cr b/src/spectator/matchers/type_matcher.cr index 581cb2e..e762ba7 100644 --- a/src/spectator/matchers/type_matcher.cr +++ b/src/spectator/matchers/type_matcher.cr @@ -1,13 +1,13 @@ -require "./value_matcher" +require "./condition_matcher" module Spectator::Matchers # Matcher that tests a value is of a specified type. # The values are compared with the `#is_a?` method. - struct TypeMatcher(Expected) < ValueMatcher(Nil) + struct TypeMatcher(Expected) < ConditionMatcher # Creates the type matcher. # The `Expected` type param will be used to populate the underlying label. def initialize - super(Expected.to_s, nil) + super(Expected.to_s) end # Determines whether the matcher is satisfied with the value given to it.