[rspec-users] stub_chain together with should_receive

medihack kai.schlamp at googlemail.com
Fri Nov 26 03:24:11 EST 2010

David, sorry for double posting (it seems I am working too much and
forgetting about what I already asked) ... and thanks for your answer.
How about a bit more convenient way for future releases. Something
MyModel.stub_chain(:tag_counts, { :offset =>
0 }, :limit, :order).and_return([])
it could also work for multi parameters:
MyModel.stub_chain(:tag_counts, { :my_method => [:param1, :param2,
param3] }, :limit, :order).and_return([])
What do you think?

More information about the rspec-users mailing list