Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3908 from kennyj/should_use_default_charset

Fix a failure in railties on ruby 1.8.x
  • Loading branch information...
commit 7b1930a9b2a7ed7d9767d9d7e969f01b66ab5485 2 parents 1bad06a + d4d2e8e
@josevalim josevalim authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 railties/test/application/initializers/frameworks_test.rb
View
5 railties/test/application/initializers/frameworks_test.rb
@@ -137,9 +137,10 @@ def from_bar_helper
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
Please sign in to comment.
Something went wrong with that request. Please try again.