Hi everyone,

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 :<<
with <FooClass>

does anyone have a good solution for this?

I tried controller.send(:current_user).labels.stub!(:<<).and_return([]) and
that didn't work.

TIA!
-Lance
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to