Skip to content

Commit

Permalink
Asserts now need html/document so it should require it
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 21, 2005
1 parent 66ecf31 commit d616b86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions 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:
Expand Down
9 changes: 0 additions & 9 deletions actionpack/lib/action_controller/test_process.rb
Expand Up @@ -349,7 +349,6 @@ def build_request_uri(action, parameters)
end

def html_document
require_html_scanner
@html_document ||= HTML::Document.new(@response.body)
end

Expand All @@ -361,14 +360,6 @@ def find_all_tag(conditions)
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
Expand Down

0 comments on commit d616b86

Please sign in to comment.