daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ApplicationController.stub!(:current_user).and_return(@user)
  2. AuthenticatedSystem.stub!(:current_user).and_return(@user)
  3. SitesController.stub!(:current_user).and_return(@user)
  4. stub!(:current_user).and_return(@user)
  5.  
  6.  
  7. ## i am doing (where @user is defined elsewhere):
  8.  
  9.       @current_user = mock_model(User, {:login => @user.name})    
  10.       request.session[:user] = @current_user
  11.  
  12. # The error I'm getting
  13. NoMethodError in 'SitesController should prepare a listing of the current users' sites on the index page'
  14. undefined method `sites' for :false:Symbol
RAW Paste Data
Top