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)
|
to_eventually(matcher)
|
||||||
end
|
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.
|
# Asserts that some criteria defined by the matcher is not satisfied.
|
||||||
# This is effectively the opposite of `#to`.
|
# This is effectively the opposite of `#to`.
|
||||||
def to_not(matcher) : Nil
|
def to_not(matcher) : Nil
|
||||||
|
@ -44,6 +48,10 @@ module Spectator::Expectations
|
||||||
to_never(matcher)
|
to_never(matcher)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_not(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
||||||
|
stubs.each { |stub| to_not(stub) }
|
||||||
|
end
|
||||||
|
|
||||||
# ditto
|
# ditto
|
||||||
@[AlwaysInline]
|
@[AlwaysInline]
|
||||||
def not_to(matcher) : Nil
|
def not_to(matcher) : Nil
|
||||||
|
|
Loading…
Reference in a new issue