diff options
Diffstat (limited to 'railties/test/application/configuration_test.rb')
-rw-r--r-- | railties/test/application/configuration_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 90f2e2b370..8bf0f09d6b 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -172,6 +172,27 @@ 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 + + test "config.paths.public sets Rails.public_path" do + add_to_config <<-RUBY + config.paths.public = "somewhere" + RUBY + + require "#{app_path}/config/application" + assert_equal File.join(app_path, "somewhere"), Rails.public_path + end + def make_basic_app require "rails" require "action_controller/railtie" |