Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ApplicationController.stub!(:current_user).and_return(@user)
- AuthenticatedSystem.stub!(:current_user).and_return(@user)
- SitesController.stub!(:current_user).and_return(@user)
- stub!(:current_user).and_return(@user)
- ## i am doing (where @user is defined elsewhere):
- @current_user = mock_model(User, {:login => @user.name})
- request.session[:user] = @current_user
- # The error I'm getting
- NoMethodError in 'SitesController should prepare a listing of the current users' sites on the index page'
- undefined method `sites' for :false:Symbol
Add Comment
Please, Sign In to add comment