mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Remove (now pointless) ConditionMatcher
This commit is contained in:
parent
5ac9020f25
commit
a53bafe333
4 changed files with 6 additions and 15 deletions
|
@ -1,9 +0,0 @@
|
|||
require "./matcher"
|
||||
|
||||
module Spectator::Matchers
|
||||
# Category of matcher that checks if an actual value satisfies a condition.
|
||||
# Sub-types must implement `#match?`, `#message`, and `#negated_message`.
|
||||
# Those methods accept a `ValueExpectationPartial` to work with.
|
||||
abstract struct ConditionMatcher < Matcher
|
||||
end
|
||||
end
|
|
@ -1,9 +1,9 @@
|
|||
require "./value_matcher"
|
||||
require "./matcher"
|
||||
|
||||
module Spectator::Matchers
|
||||
# Matcher that tests whether a collection is empty.
|
||||
# The values are checked with the `#empty?` method.
|
||||
struct EmptyMatcher < ConditionMatcher
|
||||
struct EmptyMatcher < Matcher
|
||||
# Creates the matcher.
|
||||
def initialize
|
||||
super("empty?")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
require "./value_matcher"
|
||||
require "./matcher"
|
||||
|
||||
module Spectator::Matchers
|
||||
# Common matcher that tests whether a value is nil.
|
||||
# The values are compared with the `#nil?` method.
|
||||
struct NilMatcher < ConditionMatcher
|
||||
struct NilMatcher < Matcher
|
||||
# Creates the matcher.
|
||||
def initialize
|
||||
super("nil?")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
require "./condition_matcher"
|
||||
require "./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) < ConditionMatcher
|
||||
struct TypeMatcher(Expected) < Matcher
|
||||
# Creates the type matcher.
|
||||
# The `Expected` type param will be used to populate the underlying label.
|
||||
def initialize
|
||||
|
|
Loading…
Reference in a new issue