diff options
author | Jamis Buck <jamis@37signals.com> | 2005-11-06 13:59:07 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-11-06 13:59:07 +0000 |
commit | 0073a759f14c406316062ef6e27f1de5f9ad6cdc (patch) | |
tree | 5f3ad7fd3d45e27b1aaacee549cb53c84cc94025 /actionpack/lib | |
parent | afe75566cc5b634b5756c0aba3edc7874c915941 (diff) | |
download | rails-0073a759f14c406316062ef6e27f1de5f9ad6cdc.tar.gz rails-0073a759f14c406316062ef6e27f1de5f9ad6cdc.tar.bz2 rails-0073a759f14c406316062ef6e27f1de5f9ad6cdc.zip |
Add documentation to assert_tag indicating that it only works with well-formed XHTML
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |