diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-07 02:24:29 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-07 02:25:36 +0200 |
commit | ec73710c79c5e1587b489b2ce05cc34138acf071 (patch) | |
tree | 392de31a689ee63a30be491cf1f006ae91b4bd0b /railties/test | |
parent | 48634bf59a0ed89cddd4a539c08866c9e025c5e3 (diff) | |
download | rails-ec73710c79c5e1587b489b2ce05cc34138acf071.tar.gz rails-ec73710c79c5e1587b489b2ce05cc34138acf071.tar.bz2 rails-ec73710c79c5e1587b489b2ce05cc34138acf071.zip |
Alleviate the pain in working with utf8 templates by setting a default encoding.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 90f2e2b370..97d5f64708 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -172,6 +172,18 @@ module ApplicationTests assert $prepared end + test "config.encoding sets the default encoding" do + add_to_config <<-RUBY + config.encoding = "utf-8" + RUBY + + require "#{app_path}/config/application" + + unless RUBY_VERSION < '1.9' + assert_equal Encoding.find("utf-8"), Encoding.default_external + end + end + def make_basic_app require "rails" require "action_controller/railtie" |