diff --git a/src/spectator/matchers/condition_matcher.cr b/src/spectator/matchers/condition_matcher.cr index bf9d7ba..8603c61 100644 --- a/src/spectator/matchers/condition_matcher.cr +++ b/src/spectator/matchers/condition_matcher.cr @@ -5,16 +5,5 @@ module Spectator::Matchers # Sub-types must implement `#match?`, `#message`, and `#negated_message`. # Those methods accept a `ValueExpectationPartial` to work with. abstract struct ConditionMatcher < Matcher - # Determines whether the matcher is satisfied with the value given to it. - # True is returned if the matcher is satisfied, false otherwise. - abstract def match?(partial) : Bool - - # Describes the condition that satisfies the matcher. - # This is informational and displayed to the end-user. - abstract def message(partial) : String - - # Describes the condition that won't satsify the matcher. - # This is informational and displayed to the end-user. - abstract def negated_message(partial) : String end end diff --git a/src/spectator/matchers/matcher.cr b/src/spectator/matchers/matcher.cr index b3b50bc..ae4e4f8 100644 --- a/src/spectator/matchers/matcher.cr +++ b/src/spectator/matchers/matcher.cr @@ -11,5 +11,17 @@ module Spectator::Matchers # Creates the base of the matcher. private def initialize(@label) end + + # Determines whether the matcher is satisfied with the value given to it. + # True is returned if the match was successful, false otherwise. + abstract def match?(partial) : Bool + + # Describes the condition that satisfies the matcher. + # This is informational and displayed to the end-user. + abstract def message(partial) : String + + # Describes the condition that won't satsify the matcher. + # This is informational and displayed to the end-user. + abstract def negated_message(partial) : String end end diff --git a/src/spectator/matchers/value_matcher.cr b/src/spectator/matchers/value_matcher.cr index aab946c..59272ad 100644 --- a/src/spectator/matchers/value_matcher.cr +++ b/src/spectator/matchers/value_matcher.cr @@ -23,17 +23,5 @@ module Spectator::Matchers def initialize(@expected : ExpectedType) super(@expected.to_s) end - - # Determines whether the matcher is satisfied with the value given to it. - # True is returned if the matcher is satisfied, false otherwise. - abstract def match?(partial) : Bool - - # Describes the condition that satisfies the matcher. - # This is informational and displayed to the end-user. - abstract def message(partial) : String - - # Describes the condition that won't satsify the matcher. - # This is informational and displayed to the end-user. - abstract def negated_message(partial) : String end end