# File lib/test/rails/view_test_case.rb, line 104
  def setup
    return if self.class == Test::Rails::ViewTestCase

    @path_parameters ||= {}

    klass_name = self.class.name.sub(/View/, 'Controller')
    @controller_class_name ||= klass_name.sub 'Test', ''

    super

    @ivar_proxy = Test::Rails::IvarProxy.new @controller

    # these go here so that flash and session work as they should.
    @controller.send :initialize_template_class, @response
    @controller.send :assign_shortcuts, @request, @response

    assigns[:session] = @controller.session
    @controller.class.send :public, :flash # make flash accessible to the test
  end