Merge pull request #3908 from kennyj/should_use_default_charset

Fix a failure in railties on ruby 1.8.x
This commit is contained in:
José Valim
2011-12-08 08:55:03 -08:00

View File

@@ -137,9 +137,10 @@ module ApplicationTests
end
test "assignment config.encoding to default_charset" do
add_to_config "config.encoding = 'Shift_JIS'"
charset = "ruby".respond_to?(:force_encoding) ? 'Shift_JIS' : 'UTF8'
add_to_config "config.encoding = '#{charset}'"
require "#{app_path}/config/environment"
assert_equal 'Shift_JIS', ActionDispatch::Response.default_charset
assert_equal charset, ActionDispatch::Response.default_charset
end
# AS