aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/body_parts_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/body_parts_test.rb')
-rw-r--r--actionpack/test/template/body_parts_test.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/actionpack/test/template/body_parts_test.rb b/actionpack/test/template/body_parts_test.rb
new file mode 100644
index 0000000000..4c82b75cdc
--- /dev/null
+++ b/actionpack/test/template/body_parts_test.rb
@@ -0,0 +1,22 @@
+require 'abstract_unit'
+
+class BodyPartsTest < ActionController::TestCase
+ RENDERINGS = [Object.new, Object.new, Object.new]
+
+ class TestController < ActionController::Base
+ def index
+ RENDERINGS.each do |rendering|
+ response.template.punctuate_body! rendering
+ end
+ @performed_render = true
+ end
+ end
+
+ tests TestController
+
+ def test_body_parts
+ get :index
+ assert_equal RENDERINGS, @response.body_parts
+ assert_equal RENDERINGS.join, @response.body
+ end
+end