Permalink
Browse files

Fixed the test_helper.rb to be safe for requiring controllers from mu…

…ltiple 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
  • Loading branch information...
1 parent 89e06ed commit 791e66b2da63cbb66bc41a574b92a0ca2aae1e3e @dhh dhh committed Jun 16, 2005
Showing with 6 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +4 −1 railties/helpers/test_helper.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* 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]
+
* Fixed Webrick to escape + characters in URL's the same way that lighttpd and apache do #1397 [Nicholas Seckar]
* Added -e/--environment option to script/runner #1408 [fbeausoleil@ftml.net]
@@ -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'

0 comments on commit 791e66b

Please sign in to comment.