rspecでユーザログインさせるの履歴

  before do
    @request.session = ActionController::TestSession.new
    user = User.find(1)
    @request.session[:user] = user
  end