def render(options=nil, deprecated_status_or_extra_options=nil, &block)
      if ::Rails::VERSION::STRING >= '2.0.0' && deprecated_status_or_extra_options.nil?
        deprecated_status_or_extra_options = {}
      end

      unless block_given?
        if @template.respond_to?(:finder)
          (class << @template.finder; self; end).class_eval do
            define_method :file_exists? do; true; end
          end
        else
          (class << @template; self; end).class_eval do
            define_method :file_exists? do; true; end
          end
        end
        (class << @template; self; end).class_eval do
          define_method :render_file do |*args|
            @first_render ||= args[0] unless args[0] =~ /^layouts/
            @_first_render ||= args[0] unless args[0] =~ /^layouts/
          end

          define_method :_pick_template do |*args|
            @_first_render ||= args[0] unless args[0] =~ /^layouts/
            PickedTemplate.new
          end
        end
      end

      super(options, deprecated_status_or_extra_options, &block)
    end
def render(options=nil, deprecated_status_or_extra_options=nil, &block)
      if ::Rails::VERSION::STRING >= '2.0.0' && deprecated_status_or_extra_options.nil?
        deprecated_status_or_extra_options = {}
      end

      unless block_given?
        if @template.respond_to?(:finder)
          (class << @template.finder; self; end).class_eval do
            define_method :file_exists? do; true; end
          end
        else
          (class << @template; self; end).class_eval do
            define_method :file_exists? do; true; end
          end
        end
        (class << @template; self; end).class_eval do
          define_method :render_file do |*args|
            @first_render ||= args[0] unless args[0] =~ /^layouts/
            @_first_render ||= args[0] unless args[0] =~ /^layouts/
          end

          define_method :_pick_template do |*args|
            @_first_render ||= args[0] unless args[0] =~ /^layouts/
            PickedTemplate.new
          end
        end
      end

      super(options, deprecated_status_or_extra_options, &block)
    end
From rspec-rails ControllerExampleGroup