Re: [rspec-users] How to stub ApplicationController method in request spec

2011-09-25 Thread Justin Ko
On Sep 16, 2011, at 12:33 PM, mattf wrote: > Hey there, > > I am needing to stub a 'current_user' method in an Rspec/capybara > request spec. The method is defined in ApplicationController and is > using helper_method. The method should simply return a user id. > > Alternatively, I could fix my

[rspec-users] How to stub ApplicationController method in request spec

2011-09-24 Thread mattf
Hey there, I am needing to stub a 'current_user' method in an Rspec/capybara request spec. The method is defined in ApplicationController and is using helper_method. The method should simply return a user id. Alternatively, I could fix my problem by setting 'session[:user_id]' in the spec (which