setup_with_controller() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/test_case.rb, line 104
      def setup_with_controller
        controller_class = Class.new(ActionView::TestCase::TestController)
        @controller = controller_class.new
        @request = @controller.request
        @view_flow = ActionView::OutputFlow.new
        # empty string ensures buffer has UTF-8 encoding as
        # new without arguments returns ASCII-8BIT encoded buffer like String#new
        @output_buffer = ActiveSupport::SafeBuffer.new ""
        @rendered = +""

        test_case_instance = self
        controller_class.define_method(:_test_case) { test_case_instance }
      end
Register or log in to add new notes.