Displaying 1 result from an estimated 1 matches for "lookup_method".
2006 Aug 15
0
Mocha - dynamic method calling
...;jim'', ''johnson'', ''tx'')
>
> and have it behave as if I had just called lookup directly.
Hmm. You''ve definitely got a point here. I was wondering if you couldn''t do
something like this...
def test_me
phone_book = mock()
lookup_method = mock()
phone_book.expects(:method).with(''lookup'').returns(lookup_method)
lookup_method.expects(:call).with(''jim'', ''johnson'', ''tx'')
phone_book.method(''lookup'').call(''jim'', '...