From 68dfe3e046998adec70b7fdde577db1eb41061cf Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 17 Apr 2005 06:16:00 +0000 Subject: [PATCH] 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 --- actionpack/test/abstract_unit.rb | 1 + actionpack/test/controller/cgi_test.rb | 1 - actionpack/test/controller/helper_test.rb | 12 ------------ 3 files changed, 1 insertion(+), 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