diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 9 |
2 files changed, 1 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index 1a501bcd74..7729ca991e 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -1,6 +1,7 @@ require 'test/unit' require 'test/unit/assertions' require 'rexml/document' +require "#{File.dirname(__FILE__)}/vendor/html-scanner/html/document" module Test #:nodoc: module Unit #:nodoc: diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 5c34e9fa6d..59604e7c34 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -349,7 +349,6 @@ module Test end def html_document - require_html_scanner @html_document ||= HTML::Document.new(@response.body) end @@ -361,14 +360,6 @@ module Test html_document.find_all(conditions) end - def require_html_scanner - return true if defined?(HTML::Document) - require 'html/document' - rescue LoadError - $:.unshift File.dirname(__FILE__) + "/vendor/html-scanner" - require 'html/document' - end - def method_missing(selector, *args) return @controller.send(selector, *args) if ActionController::Routing::NamedRoutes::Helpers.include?(selector) return super |