mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add missing negation variants for method stubs
This commit is contained in:
parent
9d4a5886e5
commit
53f7c94e8a
1 changed files with 8 additions and 0 deletions
|
@ -137,10 +137,18 @@ module Spectator
|
||||||
to_never(matcher)
|
to_never(matcher)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def not_to(stub : Mocks::MethodStub) : Nil
|
||||||
|
to_not(stub)
|
||||||
|
end
|
||||||
|
|
||||||
def to_not(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
def to_not(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
||||||
stubs.each { |stub| to_not(stub) }
|
stubs.each { |stub| to_not(stub) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def not_to(stubs : Enumerable(Mocks::MethodStub)) : Nil
|
||||||
|
to_not(stubs)
|
||||||
|
end
|
||||||
|
|
||||||
# Asserts that some criteria defined by the matcher is eventually satisfied.
|
# Asserts that some criteria defined by the matcher is eventually satisfied.
|
||||||
# The expectation is checked after the example finishes and all hooks have run.
|
# The expectation is checked after the example finishes and all hooks have run.
|
||||||
# Allows a custom message to be used.
|
# Allows a custom message to be used.
|
||||||
|
|
Loading…
Reference in a new issue