diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-22 12:07:45 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:07 +0200 |
commit | abeb0ff2cc99967b852c509e5d3bd186fa8a184c (patch) | |
tree | 24961bec380787acf29c8ab92a573f71989bcf2d /railties/test/application | |
parent | 153df92f9f670055505dd91c429b010478fac9d6 (diff) | |
download | rails-abeb0ff2cc99967b852c509e5d3bd186fa8a184c.tar.gz rails-abeb0ff2cc99967b852c509e5d3bd186fa8a184c.tar.bz2 rails-abeb0ff2cc99967b852c509e5d3bd186fa8a184c.zip |
Ensure that Rails.application.initialize! is called only once
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/loading_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index 7ea712d27a..a2abf642b8 100644 --- a/railties/test/application/loading_test.rb +++ b/railties/test/application/loading_test.rb @@ -89,6 +89,11 @@ class LoadingTest < Test::Unit::TestCase assert_equal [], ActiveRecord::Base.descendants end + test "initialize_cant_be_called_twice" do + require "#{app_path}/config/environment" + assert_raise(RuntimeError) { ::AppTemplate::Application.initialize! } + end + protected def setup_ar! |