diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-16 06:08:55 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-16 06:08:55 +0000 |
commit | 791e66b2da63cbb66bc41a574b92a0ca2aae1e3e (patch) | |
tree | ed940f23b51e2a9619be89a6097b8cf53f6a357d /railties/helpers | |
parent | 89e06ed4c6191aff7769aeea8842f45df85acf89 (diff) | |
download | rails-791e66b2da63cbb66bc41a574b92a0ca2aae1e3e.tar.gz rails-791e66b2da63cbb66bc41a574b92a0ca2aae1e3e.tar.bz2 rails-791e66b2da63cbb66bc41a574b92a0ca2aae1e3e.zip |
Fixed the test_helper.rb to be safe for requiring controllers from multiple spots, like app/controllers/article_controller.rb and app/controllers/admin/article_controller.rb, without reloading the environment twice #1390 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/helpers')
-rw-r--r-- | railties/helpers/test_helper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/helpers/test_helper.rb b/railties/helpers/test_helper.rb index d177ec3515..5328ccdf5f 100644 --- a/railties/helpers/test_helper.rb +++ b/railties/helpers/test_helper.rb @@ -1,5 +1,8 @@ ENV["RAILS_ENV"] = "test" -require File.dirname(__FILE__) + "/../config/environment" + +# Expand the path to environment so that Ruby does not load it multiple times +# File.expand_path can be removed if Ruby 1.9 is in use. +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'application' require 'test/unit' |