[rspec-users] Mocking and stubbing Rails' association extensions
chris at kampers.net
Thu Jan 10 14:38:55 EST 2008
On 1/10/08, Rick DeNatale <rick.denatale at gmail.com> wrote:
> So why not
> songs = [song1, song2, song3]
> songs.stub!(:streamable).and_return([song1, song2])
Oh, of course. Thank you.
I think my mind was in a rut of "must use mock or mock_model" and I didn't
think to just stub a method call on an existing array.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users