1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
David Heinemeier Hansson 2005-04-17 06:16:00 +00:00
parent db16349bc1
commit 68dfe3e046
3 changed files with 1 additions and 13 deletions

View file

@ -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'

View file

@ -1,4 +1,3 @@
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'test/unit'
require 'action_controller/cgi_ext/cgi_methods'

View file

@ -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