# File lib/spec/rails/example/view_example_group.rb, line 98
        def render(*args)
          options = Hash === args.last ? args.pop : {}
          options[:template] = args.first.to_s unless args.empty?

          set_base_view_path(options)
          add_helpers(options)

          assigns[:action_name] = @action_name

          @request.path_parameters = {
          :controller => derived_controller_name(options),
          :action => derived_action_name(options)
          }

          defaults = { :layout => false }
          options = defaults.merge options

          @controller.send(:params).reverse_merge! @request.parameters

          @controller.send :initialize_current_url

          @controller.class.instance_eval %{
            def controller_path
              "#{derived_controller_name(options)}"
            end

            def controller_name
              "#{derived_controller_name(options).split('/').last}"
            end
          }

          @controller.send :forget_variables_added_to_assigns
          @controller.send :render, options
          @controller.send :process_cleanup
        end