2009-03-13 05:36:00 -04:00
|
|
|
require 'abstract_unit'
|
|
|
|
|
2009-03-16 15:09:34 -04:00
|
|
|
class BodyPartsTest < ActionController::TestCase
|
|
|
|
RENDERINGS = [Object.new, Object.new, Object.new]
|
2009-03-13 05:36:00 -04:00
|
|
|
|
|
|
|
class TestController < ActionController::Base
|
|
|
|
def index
|
2009-03-13 21:49:53 -04:00
|
|
|
RENDERINGS.each do |rendering|
|
2009-04-29 00:29:29 -04:00
|
|
|
@template.punctuate_body! rendering
|
2009-03-13 21:49:53 -04:00
|
|
|
end
|
2009-03-13 05:36:00 -04:00
|
|
|
@performed_render = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
tests TestController
|
|
|
|
|
2009-03-16 15:09:34 -04:00
|
|
|
def test_body_parts
|
2009-03-13 05:36:00 -04:00
|
|
|
get :index
|
2009-05-02 15:57:40 -04:00
|
|
|
pending do
|
|
|
|
# TestProcess buffers body_parts into body
|
|
|
|
# TODO: Rewrite test w/o going through process
|
|
|
|
assert_equal RENDERINGS, @response.body_parts
|
|
|
|
end
|
2009-03-16 15:09:34 -04:00
|
|
|
assert_equal RENDERINGS.join, @response.body
|
2009-03-13 05:36:00 -04:00
|
|
|
end
|
|
|
|
end
|