You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: controller_extension_spec.rb
    path of file: ./repos/authie/spec/integration
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spec_helper'

RSpec.describe PagesController, type: :cont
    
  def setup_session
    browser_id = SecureRandom.uuid
    user = User.create!(username: 'adam')
    session = Authie::SessionModel.create!(user: user,
                                           login_at: Time.current,
                                           login_ip: '1.2.3.4',
                                           browser_id: browser_id,
                                           active: true)
    if block_given?
      yield(session)
      session.save!
    end