[rspec-devel] [ rspec-Patches-12682 ] Not correctly aliasing original 'stub!' and 'should_receive' methods for ApplicationController

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 30 07:53:42 EDT 2007


Patches item #12682, was opened at 2007-07-30 13:53
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12682&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Matthijs Langenberg (mlangenberg)
Assigned to: Nobody (None)
Summary: Not correctly aliasing original 'stub!' and 'should_receive' methods for ApplicationController

Initial Comment:
Revision 2184 disables controller.should_receive(:render) and controller.stub!(:render), and points to the use of expect_render or stub_render instead.

To do this, the original controller's #should_receive and #stub! methods are being aliased, but the aliasing doesn't work like it should.

I've attached a fix for the alias and a spec to check if the methods are being defined. However, there might be a need for a more 'real life' spec using the sample rails application, but that just depends on how long the deprecation message will be visible.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12682&group_id=797


More information about the rspec-devel mailing list