[Rspec-users] and_return broken when using arrays

aslak hellesoy
Fri, 27 Oct 2006 23:09:50 -0000

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
>
>