On Jul 13, 2008, at 4:35 pm, Sven Fuchs wrote:
describe "Expecting the order of methods being called on arbitrary
objects" do
it "works" do
first = mock('first')
second = mock('second')
chain = Chain.new
chain << first
chain << second
second.should_receive(:run).ordered
first.should_receive(:run).ordered
chain.run
end
end
Hi Sven
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?
Ashley
--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users