[Rspec-users] and_return broken when using arrays

aslak hellesoy aslak.hellesoy at gmail.com
Fri Oct 27 19:09:50 EDT 2006


On 10/27/06, Micah Martin <micah at 8thlight.com> wrote:
>
> 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?
>

rspec version? the semantics of and_return have recently changed on
trunk. see changelog.

> Micah Martin
> 8th Light, Inc.
> www.8thlight.com
>
>
>
>
> _______________________________________________
> Rspec-users mailing list
> Rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
>


More information about the Rspec-users mailing list