I've been wondering how to expect arbitrary methods being called in a particular order. The RSpec documentation for expecting method calls on mock objects mentions that it is possible to pass a block to #should_receive, but does not mention that it can be used to track the method call order pretty easily:

http://www.artweb-design.de/2008/7/13/expecting-arbitrary-method-calls-in-a-particular-order-in-rspec

Is there a better way of doing this?

If not, do you think it would make sense to add this to the RSpec docs? http://rspec.info/documentation/mocks/message_expectations.html


--
sven fuchs                      [EMAIL PROTECTED]
artweb design           http://www.artweb-design.de
grünberger 65           + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin          + 49 (0) 171 - 35 20 38 4 (mobile)



_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to