mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Allow deferred expectation of multiple stubs
This commit is contained in:
parent
a8e0f46645
commit
a15e2a97b1
1 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,10 @@ module Spectator::Expectations
|
|||
to_eventually(matcher)
|
||||
end
|
||||
|
||||
def to(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
||||
stubs.each { |stub| to(stub) }
|
||||
end
|
||||
|
||||
# Asserts that some criteria defined by the matcher is not satisfied.
|
||||
# This is effectively the opposite of `#to`.
|
||||
def to_not(matcher) : Nil
|
||||
|
@ -44,6 +48,10 @@ module Spectator::Expectations
|
|||
to_never(matcher)
|
||||
end
|
||||
|
||||
def to_not(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
||||
stubs.each { |stub| to_not(stub) }
|
||||
end
|
||||
|
||||
# ditto
|
||||
@[AlwaysInline]
|
||||
def not_to(matcher) : Nil
|
||||
|
|
Loading…
Reference in a new issue