mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix negative match case for contain/cover matcher
This commit is contained in:
parent
b7c686e836
commit
5673144527
1 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,13 @@ module Spectator::Matchers
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# If the expectation is negated, then this method is called instead of `#match?`.
|
||||||
|
private def does_not_match?(actual : TestExpression(T)) : Bool forall T
|
||||||
|
!expected.value.any? do |item|
|
||||||
|
actual.value.includes?(item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Message displayed when the matcher isn't satisifed.
|
# Message displayed when the matcher isn't satisifed.
|
||||||
#
|
#
|
||||||
# This is only called when `#match?` returns false.
|
# This is only called when `#match?` returns false.
|
||||||
|
|
Loading…
Reference in a new issue