From be7ab83b647c1ebb619b88854d310497075ea58f Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 10 Nov 2011 10:54:56 +0900 Subject: [PATCH] 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) --- actionpack/test/controller/new_base/bare_metal_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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