On Fri, Aug 26, 2011 at 04:39:09PM +1200, Malcolm Locke wrote:
> mock_line_item = mock("line_item")
> mock_line_item.stub(:cost).and_return(10)
> #Order.stub_chain(:line_items, :paid).and_return([mock_line_item])
order = Order.build
order.stub_chain(:line_items, :paid).and_return([mock_line_item])
Is more likely to work
Malc
--
You received this message because you are subscribed to the Google Groups "Ruby
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.