mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Placeholders for #match method
This commit is contained in:
parent
42d8eb6da3
commit
0bf106ab2e
20 changed files with 120 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue