diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index bc7ae8ae2e..3905686049 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add documentation to assert_tag indicating that it only works with well-formed XHTML #1937, #2570 [Jamis Buck] + * Added action_pack.rb stub so that ActionPack::Version loads properly [Sam Stephenson] * Added short-hand to assert_tag so assert_tag :tag => "span" can be written as assert_tag "span" [DHH] diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index 28395b2a17..262515a068 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -257,6 +257,12 @@ module Test #:nodoc: # :attributes => { :class => "enum" } }, # :descendant => { :tag => "span", # :child => /hello world/ } + # + # <strong>Please note</strong: #assert_tag and #assert_no_tag only work + # with well-formed XHTML. They recognize a few tags as implicitly self-closing + # (like br and hr and such) but will not work correctly with tags + # that allow optional closing tags (p, li, td). <em>You must explicitly + # close all of your tags to use these assertions.</em> def assert_tag(*opts) clean_backtrace do opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first |