Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-19 Thread David Chelimsky
On Mon, Oct 19, 2009 at 10:48 AM, Sergey Rogachev wrote: > *unexpected message > Please copy the exact error instead of re-typing it. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-19 Thread Sergey Rogachev
*unexpected message -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-19 Thread Sergey Rogachev
David Chelimsky wrote: > On Fri, Oct 16, 2009 at 7:21 AM, Sergey Rogachev > wrote: > David Hi David, It doesn't work, I got the following message: Mock 'addresses' recieved unexcepted message :new with ({:these => 'params'}) Regards, Sergey -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-17 Thread David Chelimsky
On Fri, Oct 16, 2009 at 7:21 AM, Sergey Rogachev wrote: > I don't know what is need to set in the variable ADDRESSES: > Organization.stub!(:find_by_id).with("100").and_return(mock_organization(:id > => "100", :addresses => ??? )) > > Somebody help me. Any ideas? I tried to find the solution of pro

[rspec-users] How to write a correct RSpec for Polymorphic Association

2009-10-16 Thread Sergey Rogachev
I don't know what is need to set in the variable ADDRESSES: Organization.stub!(:find_by_id).with("100").and_return(mock_organization(:id => "100", :addresses => ??? )) Somebody help me. Any ideas? I tried to find the solution of problem but I can't. --- rspec - controllers def mock_organization(s