aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-21 09:04:05 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-21 09:04:05 +0000
commitd616b8602565671e30effe32582951567b04bffb (patch)
tree65d3b2aa069c7f0028ded847201a37523c8e1d5d
parent66ecf31ffe751d2eeec124b081e80a38d2d47d87 (diff)
downloadrails-d616b8602565671e30effe32582951567b04bffb.tar.gz
rails-d616b8602565671e30effe32582951567b04bffb.tar.bz2
rails-d616b8602565671e30effe32582951567b04bffb.zip
Asserts now need html/document so it should require it
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/lib/action_controller/assertions.rb1
-rw-r--r--actionpack/lib/action_controller/test_process.rb9
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