diff options
author | Franck Verrot <franck@verrot.fr> | 2011-08-15 10:11:11 +0200 |
---|---|---|
committer | Franck Verrot <franck@verrot.fr> | 2012-03-28 00:42:59 +0200 |
commit | 4882271f6bae7bc8d91caf36cc8f16c7e6969b7b (patch) | |
tree | 9f3ce02cd6972790a1162699d8c854788fa80b9d /railties/test/application | |
parent | 33164c8f1479b826a044ab90f4cc2439666e4b16 (diff) | |
download | rails-4882271f6bae7bc8d91caf36cc8f16c7e6969b7b.tar.gz rails-4882271f6bae7bc8d91caf36cc8f16c7e6969b7b.tar.bz2 rails-4882271f6bae7bc8d91caf36cc8f16c7e6969b7b.zip |
Rails.initialized? can be called at any time without raising an exception [Closes #2507]
Changes:
* `Rails.initialized=` has been removed
* `Rails.initialized?` and `Rails.application.initialized?` are now
* delegating to `MyApp::Application.initialized?`
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/loading_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index 9302443c98..92951e1676 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -285,6 +285,16 @@ class LoadingTest < ActiveSupport::TestCase assert_equal 'OK', last_response.body end + def test_initialize_can_be_called_at_any_time + require "#{app_path}/config/application" + + assert !Rails.initialized? + assert !AppTemplate::Application.initialized? + Rails.initialize! + assert Rails.initialized? + assert AppTemplate::Application.initialized? + end + protected def setup_ar! |