[rspec-devel] Mocking in the past tense
lists-rspec at shopwatch.org
Mon Nov 20 07:34:42 EST 2006
David Chelimsky wrote:
>> If may_receive is a synonym for stubs, and if a mock can override a stub
>> today, then this may even work already.
> It does. Check out
>> But I like the may_receive
>> syntax, since I'm not really stubbing - I'm just building the framework
>> for a mock.
> I think that depends on what your view of a stub is. To me, it's the
> same as what you're describing as may_receive. Read the blog and let
> me know what you think?
You're right. I was thinking of stubs and mocks as independent objects.
But what we're really doing here is stubbing most of an object and
mocking part of it, and so the current syntax is actually quite
descriptive. Thanks for the blog example; that really clarified things
for me, and it oughta make its way into the doc somehow.
>> rspec-devel mailing list
>> rspec-devel at rubyforge.org
> rspec-devel mailing list
> rspec-devel at rubyforge.org
More information about the rspec-devel