aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-03-05 22:21:04 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-03-05 22:21:04 +0300
commit1e0387e8a17e65b6f80f119c8ff458702a824083 (patch)
tree0ff8334395c4eb3e671fc89843a7130383cd244a /actionpack/test
parentc97a1666910aa82b9c4348402cc8f52492b58692 (diff)
downloadrails-1e0387e8a17e65b6f80f119c8ff458702a824083.tar.gz
rails-1e0387e8a17e65b6f80f119c8ff458702a824083.tar.bz2
rails-1e0387e8a17e65b6f80f119c8ff458702a824083.zip
force response body to be read in assert_template
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/layout_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb
index bc171e201b..c73b36f05e 100644
--- a/actionpack/test/controller/layout_test.rb
+++ b/actionpack/test/controller/layout_test.rb
@@ -78,6 +78,13 @@ end
class DefaultLayoutController < LayoutTest
end
+class StreamingLayoutController < LayoutTest
+ def render(*args)
+ options = args.extract_options! || {}
+ super(*args, options.merge(:stream => true))
+ end
+end
+
class AbsolutePathLayoutController < LayoutTest
layout File.expand_path(File.expand_path(__FILE__) + '/../../fixtures/layout_tests/layouts/layout_test')
end
@@ -122,6 +129,12 @@ class LayoutSetInResponseTest < ActionController::TestCase
assert_template :layout => "layouts/layout_test"
end
+ def test_layout_set_when_using_streaming_layout
+ @controller = StreamingLayoutController.new
+ get :hello
+ assert_template :hello
+ end
+
def test_layout_set_when_set_in_controller
@controller = HasOwnLayoutController.new
get :hello