[Rspec-users] and_return broken when using arrays

Micah Martin
Fri, 27 Oct 2006 20:34:11 -0000

m = mock("blah")
m.should_receive(:foo).and_return([1, 2, 3])

When foo() is called on the mock it returns the first elements of the
array, 1.  Shouldn''t it return the whole array?

Micah Martin
8th Light, Inc.
www.8thlight.com



-------------- next part --------------
An HTML attachment was scrubbed...