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/ } + # + # Please noteYou must explicitly + # close all of your tags to use these assertions. def assert_tag(*opts) clean_backtrace do opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first