[rspec-users] Is stubbing a call to super possible?
smingins at elctech.com
Thu Oct 4 21:26:14 EDT 2007
On 5/10/2007, at 11:56 AM, Shane Mingins wrote:
> Is stubbing a call to super possible? I am testing a protected
> method called authorized in a Rails controller ... part of the
> logic flow calls super which calls the method authorized in the
> application controller.
> As I am focused on the logic of the method in the controller I am
> testing I just wish to stub the value returned in the super.
> Is this at all possible?
In the meantime I have used alias_method_chain to override the method
in the super class.
More information about the rspec-users