diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-18 23:23:54 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:04 +0200 |
commit | 7cccfed5943cddd6d72ed0df0ee7291cca9025ad (patch) | |
tree | 5750097c50f8359a4a83ffce97e41d60d9d87af6 /railties/test/application | |
parent | 15f95b98ac048407a1ce6873bb02fc5fbb6c991c (diff) | |
download | rails-7cccfed5943cddd6d72ed0df0ee7291cca9025ad.tar.gz rails-7cccfed5943cddd6d72ed0df0ee7291cca9025ad.tar.bz2 rails-7cccfed5943cddd6d72ed0df0ee7291cca9025ad.zip |
Allow Engines loading its own environment file from config/environments
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/loading_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index ecf7904c39..7ea712d27a 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -42,6 +42,23 @@ class LoadingTest < Test::Unit::TestCase User end + test "load config/environments/environment before Bootstrap initializers" do + app_file "config/environments/development.rb", <<-RUBY + AppTemplate::Application.configure do + config.development_environment_loaded = true + end + RUBY + + add_to_config <<-RUBY + config.before_initialize do + config.loaded = config.development_environment_loaded + end + RUBY + + require "#{app_path}/config/environment" + assert ::AppTemplate::Application.config.loaded + end + def test_descendants_are_cleaned_on_each_request_without_cache_classes add_to_config <<-RUBY config.cache_classes = false |