Remove (now pointless) ConditionMatcher

This commit is contained in:
Michael Miller 2019-01-31 13:42:24 -07:00
parent 5ac9020f25
commit a53bafe333
4 changed files with 6 additions and 15 deletions

View file

@ -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

View file

@ -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?")

View file

@ -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?")

View file

@ -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