aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-07-24 13:12:27 +0200
committerTimm <kaspth@gmail.com>2014-06-16 21:03:55 +0200
commit9eada2daf812ae95d47a22ebe4ecc058a980a38b (patch)
treef363da326ba2487fd58f3c60961a614e8fc24c4d /guides/source/testing.md
parente4772cc71edd13f0e3637c70b59fd6e8665e18ad (diff)
downloadrails-9eada2daf812ae95d47a22ebe4ecc058a980a38b.tar.gz
rails-9eada2daf812ae95d47a22ebe4ecc058a980a38b.tar.bz2
rails-9eada2daf812ae95d47a22ebe4ecc058a980a38b.zip
Readded some documentation about substitution values.
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 5f07f0cc93..5825ee1074 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. This has been removed in 4.1. Use `assert_select` instead.
+NOTE: You may find references to `assert_tag` in other documentation. This has been removed in 4.2. 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) 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 `Nokogiri::XML::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` or `Nokogiri::XML::NodeSet`) and its descendants.
For example, you could verify the contents on the title element in your response with:
@@ -633,7 +633,7 @@ assert_select "ol" do
end
```
-The `assert_select` assertion is quite powerful. For more advanced usage, refer to its [documentation](http://api.rubyonrails.org/classes/ActionDispatch/Assertions/SelectorAssertions.html).
+The `assert_select` assertion is quite powerful. For more advanced usage, refer to its [documentation](https://github.com/rails/rails-dom-testing/blob/master/lib/rails/dom/testing/assertions/selector_assertions.rb).
#### Additional View-Based Assertions