aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/test/template/body_parts_test.rb
blob: e17092a452e9d3d082f8a5a5da3dff7e60beb540 (plain) (tree)
1
2
3
4
5
6
7
8
9
                       
 

                                                   


                                               
                                    
                                           
         

                              



                      
                     
              




                                                    
                                                

     
require 'abstract_unit'

class BodyPartsTest < ActionController::TestCase
  RENDERINGS = [Object.new, Object.new, Object.new]

  class TestController < ActionController::Base
    def index
      RENDERINGS.each do |rendering|
        @template.punctuate_body! rendering
      end
      @performed_render = true
    end
  end

  tests TestController

  def test_body_parts
    get :index
    pending do
      # TestProcess buffers body_parts into body
      # TODO: Rewrite test w/o going through process
      assert_equal RENDERINGS, @response.body_parts
    end
    assert_equal RENDERINGS.join, @response.body
  end
end