David Chelimsky wrote: > > Looks like action_pack calls render twice (the 2nd time in > action_controller/metal/implicit_render.rb:10:in `default_render'), so > we've got to stub the :render call twice: > > page = double('page') > controller.stub(:render) > controller.stub(:render).with(:update).and_yield(page) > page.should_receive(:replace_html).with(...) > > Bummer. It seems like this is a rails bug (render should only get called > once, and there is code that prevents it from being called twice, but > not _all_ of the time), but I'm not sure if I can make that case or not. > I'll try :)
Have this problem been reported to the rails project. I am not using rspec, but trying to stub away rendering and run into the same situation; have to call #expects twice using Mocha framework. Could it be this ticket: https://rails.lighthouseapp.com/projects/8994/tickets/2279-render-layout-with-block-and-multiple-yields -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users