From 32b53e72deffa9fdc22059b746270079bf3b15bc Mon Sep 17 00:00:00 2001 From: Craig Davey Date: Mon, 24 Nov 2008 16:36:04 -0500 Subject: [PATCH] =?utf-8?q?Autoload=20HTML::Node=20so=20that=20it=E2=80=99s=20available=20in=20assert=5Fselect.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit --- .../lib/action_controller/vendor/html-scanner.rb | 9 +++++---- actionpack/test/controller/assert_select_test.rb | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/action_controller/vendor/html-scanner.rb b/actionpack/lib/action_controller/vendor/html-scanner.rb index 5c6db99..6f0d910 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner.rb @@ -1,9 +1,10 @@ $LOAD_PATH << "#{File.dirname(__FILE__)}/html-scanner" module HTML - autoload :Document, 'html/document' - autoload :Sanitizer, 'html/sanitizer' - autoload :FullSanitizer, 'html/sanitizer' - autoload :LinkSanitizer, 'html/sanitizer' + autoload :Document, 'html/document' + autoload :Node, 'html/node' + autoload :Sanitizer, 'html/sanitizer' + autoload :FullSanitizer, 'html/sanitizer' + autoload :LinkSanitizer, 'html/sanitizer' autoload :WhiteListSanitizer, 'html/sanitizer' end diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index ed8c442..1c0e1a8 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -92,6 +92,14 @@ class AssertSelectTest < ActionController::TestCase assert_failure(/Expected at least 1 element matching \"p\", found 0/) { assert_select "p" } end + def test_assert_select_when_dependencies_have_not_been_loaded + ActiveSupport::Dependencies.clear + render_html %Q{
} + assert_nothing_raised do + assert_select "div", true + end + end + def test_equality_true_false render_html %Q{
} assert_nothing_raised { assert_select "div" } -- 1.6.0