Allow expected value to receive stub

This commit is contained in:
Michael Miller 2019-11-16 08:32:13 -07:00
parent 72e4ac8fe9
commit 6cd410c4c7

View file

@ -25,6 +25,7 @@ module Spectator::Expectations
end
def to(stub : Mocks::MethodStub) : Nil
Mocks::Allow.new(@actual.value).to(stub)
value = TestValue.new(stub.name, stub.to_s)
matcher = if (arguments = stub.arguments?)
Matchers::ReceiveArgumentsMatcher.new(value, arguments)