Hey Ashley!

How's things? :)

On 13.07.2008, at 17:44, Ashley Moran wrote:
I think you want

 second.should_receive(:run) do
   first.should_receive(:run)
 end

which, if Mail.app is running my specs correctly, should only pass if second receives :run before first

Is that what you were after?

Wow, yes.

This also uses the block passed to should_receive, but in a nicer way than my inital attemp which is a bit chatty.

It'd look a bit odd when I want to specify the order for a bunch of methods, but actually I don't need to do that here.

Again, this really should be documented. I even started digging into the RSpec source, but obviously lacked the creativity for this :)


--
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