diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-02 19:34:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-02 19:34:49 +0000 |
commit | dc792361202bd7a682da79375ce1236a7b3ec293 (patch) | |
tree | f5853d4ca8259f7aef5c15c56ba896123b5f3578 /actionpack/lib | |
parent | 609ca177fa66ab0fbe19dd0cdcd7d8f1576cd9da (diff) | |
download | rails-dc792361202bd7a682da79375ce1236a7b3ec293.tar.gz rails-dc792361202bd7a682da79375ce1236a7b3ec293.tar.bz2 rails-dc792361202bd7a682da79375ce1236a7b3ec293.zip |
Fixed problems with running multiple functional tests in Rails under 1.8.2 by including hack for test/unit weirdness
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 550b8a340d..f49b2dd3bf 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -1,6 +1,22 @@ require File.dirname(__FILE__) + '/assertions/action_pack_assertions' require File.dirname(__FILE__) + '/assertions/active_record_assertions' +if defined?(RAILS_ROOT) + # Temporary hack for getting functional tests in Rails running under 1.8.2 + class Object #:nodoc: + alias_method :require_without_load_path_reloading, :require + def require(file_name) + begin + require_without_load_path_reloading(file_name) + rescue Object => e + ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } + require_without_load_path_reloading(file_name) + end + end + end +end + + module ActionController #:nodoc: class Base # Process a test request called with a +TestRequest+ object. |