aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
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/lib/action_controller/test_case.rb
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/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 3509e74d5e..e9a3ec5a22 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -69,6 +69,10 @@ module ActionController
# assert_template :partial => '_customer', :locals => { :customer => @customer }
#
def assert_template(options = {}, message = nil)
+ # Force body to be read in case the
+ # template is being streamed
+ response.body
+
case options
when NilClass, String, Symbol
options = options.to_s if Symbol === options