Registry#expect takes a stub

This commit is contained in:
Michael Miller 2019-12-13 19:56:43 -07:00
parent a38625f8a7
commit 16625cf495

View file

@ -7,7 +7,7 @@ module Spectator::Mocks
def to(stub : MethodStub) : Nil
actual = TestValue.new(T)
Harness.current.mocks.expect(T, stub.name)
Harness.current.mocks.expect(T, stub)
value = TestValue.new(stub.name, stub.to_s)
matcher = Matchers::ReceiveTypeMatcher.new(value, stub.arguments?)
partial = Expectations::ExpectationPartial.new(actual, @source)