diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 06:16:00 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 06:16:00 +0000 |
commit | 68dfe3e046998adec70b7fdde577db1eb41061cf (patch) | |
tree | 2a81e3a10473357bb04146a323c2a8e268fc111d /actionpack | |
parent | db16349bc15a726458aa33ca50af9dc7a6ef2d45 (diff) | |
download | rails-68dfe3e046998adec70b7fdde577db1eb41061cf.tar.gz rails-68dfe3e046998adec70b7fdde577db1eb41061cf.tar.bz2 rails-68dfe3e046998adec70b7fdde577db1eb41061cf.zip |
Clean up load paths to avoid unit test interaction #1113 [alles@atomicobject.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 1 | ||||
-rwxr-xr-x | actionpack/test/controller/cgi_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/helper_test.rb | 12 |
3 files changed, 1 insertions, 13 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 99c911c2dd..4b244e9472 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -1,5 +1,6 @@ $:.unshift(File.dirname(__FILE__) + '/../lib') $:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib') +$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') require 'test/unit' require 'action_controller' diff --git a/actionpack/test/controller/cgi_test.rb b/actionpack/test/controller/cgi_test.rb index 2cee763491..dbdf6a5b96 100755 --- a/actionpack/test/controller/cgi_test.rb +++ b/actionpack/test/controller/cgi_test.rb @@ -1,4 +1,3 @@ -$:.unshift(File.dirname(__FILE__) + '/../../lib') require 'test/unit' require 'action_controller/cgi_ext/cgi_methods' diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 2c2c48f15b..147d36501b 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -1,5 +1,4 @@ require File.dirname(__FILE__) + '/../abstract_unit' -$:.unshift(File.dirname(__FILE__) + '/../fixtures/helpers') class TestController < ActionController::Base attr_accessor :delegate_attr @@ -24,7 +23,6 @@ module LocalAbcHelper end class HelperTest < Test::Unit::TestCase - HELPER_PATHS = %w(/../fixtures/helpers) def setup # Increment symbol counter. @@ -41,11 +39,6 @@ class HelperTest < Test::Unit::TestCase @template_class = self.class.const_get(template_class_name) @controller_class.template_class = @template_class - # Add helper paths to LOAD_PATH. - HELPER_PATHS.each { |path| - $LOAD_PATH.unshift(File.dirname(__FILE__) + path) - } - # Set default test helper. self.test_helper = LocalAbcHelper end @@ -53,11 +46,6 @@ class HelperTest < Test::Unit::TestCase def teardown # Reset template class. #ActionController::Base.template_class = ActionView::Base - - # Remove helper paths from LOAD_PATH. - HELPER_PATHS.each { |path| - $LOAD_PATH.delete(File.dirname(__FILE__) + path) - } end |