[rspec-users] Testing shorthand array push <<
lancecarlson at gmail.com
Fri Jul 20 22:52:49 EDT 2007
I'm trying to test the shorthand way to push objects into an array. My
controller looks like:
current_user.foos << @foo
and I keep getting an error like Mock 'foos' received unexpected message :<<
does anyone have a good solution for this?
I tried controller.send(:current_user).labels.stub!(:<<).and_return() and
that didn't work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users