mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Allow expected value to receive stub
This commit is contained in:
parent
72e4ac8fe9
commit
6cd410c4c7
1 changed files with 1 additions and 0 deletions
|
@ -25,6 +25,7 @@ module Spectator::Expectations
|
||||||
end
|
end
|
||||||
|
|
||||||
def to(stub : Mocks::MethodStub) : Nil
|
def to(stub : Mocks::MethodStub) : Nil
|
||||||
|
Mocks::Allow.new(@actual.value).to(stub)
|
||||||
value = TestValue.new(stub.name, stub.to_s)
|
value = TestValue.new(stub.name, stub.to_s)
|
||||||
matcher = if (arguments = stub.arguments?)
|
matcher = if (arguments = stub.arguments?)
|
||||||
Matchers::ReceiveArgumentsMatcher.new(value, arguments)
|
Matchers::ReceiveArgumentsMatcher.new(value, arguments)
|
||||||
|
|
Loading…
Reference in a new issue