diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-10 16:52:00 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-10 16:52:00 -0300 |
commit | 3229eda00c2a38526787fddb6cc307cfee5c5ac6 (patch) | |
tree | 9b45bf0c52e5b20ab403a5ac0025b9b1b18a5ce3 /guides/source | |
parent | 6e76031e8f1f815b390f966cb21e25c66e5ded50 (diff) | |
parent | ff1b7e75357eb7797f25aeab33994765130db67f (diff) | |
download | rails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.tar.gz rails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.tar.bz2 rails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.zip |
Merge pull request #11218 from kaspth/loofah-integration
Loofah-integration
Conflicts:
actionpack/CHANGELOG.md
actionview/CHANGELOG.md
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/testing.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index 561fe2cf70..a88625a40a 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.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), 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` 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 |