Re: [rspec-users] Not sure why this is failing

2007-11-18 Thread David Chelimsky
On Nov 18, 2007 10:10 AM, Jonathan Linowes <[EMAIL PROTECTED]> wrote: > personally I find this to be one of the most frustrating things about > rspec, well, rspec's stubs > and wish the error messages could be much more helpful, > rather than just telling that an expected method was not called, tel

Re: [rspec-users] Not sure why this is failing

2007-11-18 Thread Jonathan Linowes
personally I find this to be one of the most frustrating things about rspec, well, rspec's stubs and wish the error messages could be much more helpful, rather than just telling that an expected method was not called, tell me if/when it was called with some other args instead (if this causes ex

Re: [rspec-users] Not sure why this is failing

2007-11-17 Thread Scott Taylor
On Nov 18, 2007, at 12:04 AM, Chris Olsen wrote: > Steve Ross wrote: >> Try with(nil) >> >> I think params[:user] will return nil. > > yip that works, after fooling with it I also found that :any_args > works > as well as any (I guess this one is more than just a symbol) > > Thanks for the help

Re: [rspec-users] Not sure why this is failing

2007-11-17 Thread Chris Olsen
Steve Ross wrote: > Try with(nil) > > I think params[:user] will return nil. yip that works, after fooling with it I also found that :any_args works as well as any (I guess this one is more than just a symbol) Thanks for the help. -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Not sure why this is failing

2007-11-17 Thread s.ross
Try with(nil) I think params[:user] will return nil. On Nov 17, 2007, at 8:18 PM, __iso __ wrote: >>> Address.should_receive(:new).with(no_args).and_return @address > > That doesn't seem to work either. I had also tried with :any and that > failed as well. > > It does seem to work when removin

Re: [rspec-users] Not sure why this is failing

2007-11-17 Thread __iso __
>> Address.should_receive(:new).with(no_args).and_return @address That doesn't seem to work either. I had also tried with :any and that failed as well. It does seem to work when removing the .with() call though. -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] Not sure why this is failing

2007-11-17 Thread Scott Taylor
On Nov 17, 2007, at 10:52 PM, Chris Olsen wrote: > I am not sure why the tests don't see the call of the new method > for the > Address class. It can be seen in the controller method where the > Address.new is called. >>> @address = Address.new(params[:address]) > > What am I doing wrong? > Y

[rspec-users] Not sure why this is failing

2007-11-17 Thread Chris Olsen
I am not sure why the tests don't see the call of the new method for the Address class. It can be seen in the controller method where the Address.new is called. >> @address = Address.new(params[:address]) What am I doing wrong? Thanks for the help. Here is the error message: Spec::Mocks::MockEx