# File lib/test/rails/functional_test_case.rb, line 24
  def setup
    return if self.class.name =~ /TestCase$/ and not $TESTING_RTC
    super

    @controller_class = Object.path2class @controller_class_name
    raise "Can't determine controller class for #{self.class}" if @controller_class.nil?

    @controller = @controller_class.new

    @session = ActionController::TestSession.new

    @flash = ActionController::Flash::FlashHash.new
    @session['flash'] = @flash

    @request = ActionController::TestRequest.new
    @request.session = @session

    # HACK There's probably an official way to do this
    @controller.instance_variable_set :@_session, @request.session

    @response = ActionController::TestResponse.new

    setup_extra if respond_to? :setup_extra
  end