aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2011-11-10 10:54:56 +0900
committerAkira Matsuda <ronnie@dio.jp>2011-11-10 10:54:56 +0900
commitbe7ab83b647c1ebb619b88854d310497075ea58f (patch)
tree03e5603cfd9754e38389afb887d01f087653bcab /actionpack
parentcc3e738d89cc5a433473559c3f70e98c08f646de (diff)
downloadrails-be7ab83b647c1ebb619b88854d310497075ea58f.tar.gz
rails-be7ab83b647c1ebb619b88854d310497075ea58f.tar.bz2
rails-be7ab83b647c1ebb619b88854d310497075ea58f.zip
A test case to ensure that AC::Metal#response_body= always wraps the given value in an Array in both Ruby 1.8 and 1.9 (refs #3581)
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/new_base/bare_metal_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_base/bare_metal_test.rb b/actionpack/test/controller/new_base/bare_metal_test.rb
index 3ca29f1bcf..c424dcbd8d 100644
--- a/actionpack/test/controller/new_base/bare_metal_test.rb
+++ b/actionpack/test/controller/new_base/bare_metal_test.rb
@@ -23,6 +23,12 @@ module BareMetalTest
assert_equal "Hello world", string
end
+
+ test "response_body value is wrapped in an array when the value is a String" do
+ controller = BareController.new
+ controller.index
+ assert_equal ["Hello world"], controller.response_body
+ end
end
class HeadController < ActionController::Metal