On Jan 3, 2008 12:20 PM, Kerry Buckley <[EMAIL PROTECTED]> wrote:
>
> On 2 Jan 2008, at 22:09, David Chelimsky wrote:
>
> > On Jan 2, 2008 5:20 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> >
> >> RSpec doesn't enforce strict-order mocking.
> >
> > Sure it does, if you ask it to:
> > http://rspec.info/documentation/mocks/message_expectations.html
>
> Am I right, though, in thinking that you can't enforce order between
> two mocks? It would occasionally be nice to be able to say something
> like:
>
> master.should_receive(:start).and_then(slave).should_receive(:start)
>


I'd like to be proven wrong again, but I don't think you can do this
with rspec. From running some examples in irb it looks like each mock
only verifies its own order. Hardmock does support this. Flexmock does
not that I am aware of, and Mocha most certainly does not.

 Hardmock considers all expectations ordered across all mocks.
Hardmock does work with rspec too:
  http://hardmock.rubyforge.org/doc/index.html


-- 
Zach Dennis
http://www.continuousthinking.com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to