Add missing negation variants for method stubs

This commit is contained in:
Michael Miller 2021-10-11 22:39:16 -06:00
parent 9d4a5886e5
commit 53f7c94e8a
No known key found for this signature in database
GPG Key ID: F9A0C5C65B162436
1 changed files with 8 additions and 0 deletions

View File

@ -137,10 +137,18 @@ module Spectator
to_never(matcher)
end
def not_to(stub : Mocks::MethodStub) : Nil
to_not(stub)
end
def to_not(stubs : Enumerable(Mocks::MethodStub)) : Nil
stubs.each { |stub| to_not(stub) }
end
def not_to(stubs : Enumerable(Mocks::MethodStub)) : Nil
to_not(stubs)
end
# Asserts that some criteria defined by the matcher is eventually satisfied.
# The expectation is checked after the example finishes and all hooks have run.
# Allows a custom message to be used.