Placeholders for #match method

This commit is contained in:
Michael Miller 2019-02-23 22:33:33 -07:00
parent 42d8eb6da3
commit 0bf106ab2e
20 changed files with 120 additions and 0 deletions

View file

@ -19,6 +19,12 @@ module Spectator::Matchers
true
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
expected === partial.actual
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -12,6 +12,12 @@ module Spectator::Matchers
end
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -9,6 +9,12 @@ module Spectator::Matchers
super("empty?")
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
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)

View file

@ -12,6 +12,12 @@ module Spectator::Matchers
compare_method(actual, &.eval(actual, expected))
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual == expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual >= expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual > expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual.has_key?(expected)
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -16,6 +16,12 @@ module Spectator::Matchers
end
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Checks if a `String` matches the expected values.
# The `includes?` method is used for this check.
private def match_string?(actual)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual.has_value?(expected)
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual != expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual <= expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
partial.actual < expected
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -25,6 +25,12 @@ module Spectator::Matchers
true
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -12,6 +12,12 @@ module Spectator::Matchers
@expected.includes?(partial.actual)
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -10,6 +10,12 @@ module Spectator::Matchers
!!(partial.actual =~ expected)
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -12,6 +12,12 @@ module Spectator::Matchers
compare_method(actual, &.eval(actual, expected))
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -23,6 +23,12 @@ module Spectator::Matchers
@expected == !!partial.actual
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)

View file

@ -16,6 +16,12 @@ module Spectator::Matchers
partial.actual.is_a?(Expected)
end
# Determines whether the matcher is satisfied with the partial given to it.
# `MatchData` is returned that contains information about the match.
def match(partial) : MatchData
raise NotImplementedError.new("#match")
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message(partial)