mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Derive type matcher from condition matcher
This commit is contained in:
parent
69d0856256
commit
840da3a8b7
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
require "./value_matcher"
|
||||
require "./condition_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) < ValueMatcher(Nil)
|
||||
struct TypeMatcher(Expected) < ConditionMatcher
|
||||
# Creates the type matcher.
|
||||
# The `Expected` type param will be used to populate the underlying label.
|
||||
def initialize
|
||||
super(Expected.to_s, nil)
|
||||
super(Expected.to_s)
|
||||
end
|
||||
|
||||
# Determines whether the matcher is satisfied with the value given to it.
|
||||
|
|
Loading…
Reference in a new issue