Skip to content

Commit

Permalink
Fixed problems with running multiple functional tests in Rails under …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
dhh committed Jan 2, 2005
1 parent 609ca17 commit dc79236
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Fixed problems with running multiple functional tests in Rails under 1.8.2 by including hack for test/unit weirdness

* Added thread-safety to the DRbStore #66, #389 [Ben Stiglitz]

* Added DateHelper#select_time and DateHelper#select_second #373 [Scott Baron]
Expand Down
16 changes: 16 additions & 0 deletions 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.
Expand Down

0 comments on commit dc79236

Please sign in to comment.