diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-24 12:15:46 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-24 12:15:46 +0100 |
commit | b92608770e20618ab6a6c67099dd19ae4533689e (patch) | |
tree | 205b1303668555a31f3d228a58c84a10ac53093d /railties/test/application | |
parent | 37e4deb2606557e5340b48169ffc1435bb331439 (diff) | |
download | rails-b92608770e20618ab6a6c67099dd19ae4533689e.tar.gz rails-b92608770e20618ab6a6c67099dd19ae4533689e.tar.bz2 rails-b92608770e20618ab6a6c67099dd19ae4533689e.zip |
Ensure environment config has higher priority than application ones.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/initializer_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb index 6686d82f19..053757979b 100644 --- a/railties/test/application/initializer_test.rb +++ b/railties/test/application/initializer_test.rb @@ -38,13 +38,24 @@ module ApplicationTests end test "load environment with global" do - app_file "config/environments/development.rb", "$initialize_test_set_from_env = 'success'" + app_file "config/environments/development.rb", <<-RUBY + $initialize_test_set_from_env = 'success' + AppTemplate::Application.configure do + config.cache_classes = true + config.time_zone = "Brasilia" + end + RUBY + assert_nil $initialize_test_set_from_env add_to_config <<-RUBY config.root = "#{app_path}" + config.time_zone = "UTC" RUBY + require "#{app_path}/config/environment" assert_equal "success", $initialize_test_set_from_env + assert AppTemplate::Application.config.cache_classes + assert_equal "Brasilia", AppTemplate::Application.config.time_zone end test "action_controller load paths set only if action controller in use" do |