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, tell > me if/when it was called with some other args instead > (if this causes excessive overhead, perhaps a runtime option like, -- > trace "Address.new" )
This sounds reasonable. Please submit a ticket to the tracker. A patch would be best, but a bug report would be fine to get it on the radar. Cheers, David > > --linoj > > > > On Nov 17, 2007, at 11:50 PM, s.ross wrote: > > > 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 removing the .with() call though. > >> > >> -- > >> Posted via http://www.ruby-forum.com/. > >> _______________________________________________ > >> rspec-users mailing list > >> [email protected] > >> http://rubyforge.org/mailman/listinfo/rspec-users > > > > _______________________________________________ > > rspec-users mailing list > > [email protected] > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
