aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-07-23 20:48:58 +0200
committerTimm <kaspth@gmail.com>2014-06-15 23:41:08 +0200
commit1bc34386cf8c10d69a637527a24d884822326924 (patch)
tree5725a5b1657922de7b27db6723e41e61d5d22b46 /guides/source/testing.md
parentbc1363eb561f8dc739d9e9571ebf85c0ea292eee (diff)
downloadrails-1bc34386cf8c10d69a637527a24d884822326924.tar.gz
rails-1bc34386cf8c10d69a637527a24d884822326924.tar.bz2
rails-1bc34386cf8c10d69a637527a24d884822326924.zip
Updated testing guide to reflect changes in ActionDispatch::SelectorAssertions.
Diffstat (limited to 'guides/source/testing.md')
-rw-r--r--guides/source/testing.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index c01b2e575a..5f07f0cc93 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -597,13 +597,13 @@ end
Testing the response to your request by asserting the presence of key HTML elements and their content is a useful way to test the views of your application. The `assert_select` assertion allows you to do this by using a simple yet powerful syntax.
-NOTE: You may find references to `assert_tag` in other documentation, but this is now deprecated in favor of `assert_select`.
+NOTE: You may find references to `assert_tag` in other documentation. This has been removed in 4.1. Use `assert_select` instead.
There are two forms of `assert_select`:
-`assert_select(selector, [equality], [message])` ensures that the equality condition is met on the selected elements through the selector. The selector may be a CSS selector expression (String), an expression with substitution values, or an `HTML::Selector` object.
+`assert_select(selector, [equality], [message])` ensures that the equality condition is met on the selected elements through the selector. The selector may be a CSS selector expression (String) or an expression with substitution values.
-`assert_select(element, selector, [equality], [message])` ensures that the equality condition is met on all the selected elements through the selector starting from the _element_ (instance of `HTML::Node`) and its descendants.
+`assert_select(element, selector, [equality], [message])` ensures that the equality condition is met on all the selected elements through the selector starting from the _element_ (instance of `Nokogiri::XML::Node`) and its descendants.
For example, you could verify the contents on the title element in your response with: