From db9be587196b2fdebacaecf54efe70940b006989 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 3 Sep 2006 16:40:01 +0000 Subject: [PATCH] Cleanup assert_tag :children counting. Closes #2181. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ .../lib/action_controller/vendor/html-scanner/html/node.rb | 1 - actionpack/test/controller/test_test.rb | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index d6dda2d47a..d8fe2ab5ab 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Cleanup assert_tag :children counting. #2181 [jamie@bravenet.com] + * button_to accepts :method so you can PUT and DELETE with it. #6005 [Dan Webb] * Update sanitize text helper to strip plaintext tags, and . [Rick Olson] diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb index 3397e0db15..7b53af9591 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb @@ -455,7 +455,6 @@ def match(conditions) # count children if opts = conditions[:children] matches = children.select do |c| - c.match(/./) or (c.kind_of?(HTML::Tag) and (c.closing == :self or ! c.childless?)) end diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 58ed819e12..1eda834351 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -215,6 +215,8 @@ def test_assert_tag_children_count # there is a tag with 2 children assert_tag :children => { :count => 2 } + # in particular, there is a