Flowdock

Adds the assert_select method for use in Rails functional test cases, which can be used to make assertions on the response HTML of a controller action. You can also call assert_select within another assert_select to make assertions on elements selected by the enclosing assertion.

Use css_select to select elements without making an assertions, either from the response HTML or elements selected by the enclosing assertion.

In addition to HTML responses, you can make the following assertions:

Also see HTML::Selector to learn how to use selectors.

Constants

RJS_PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/

RJS_INSERTIONS = ["top", "bottom", "before", "after"]

RJS_STATEMENTS = { :chained_replace => "\\$\\(#{RJS_ANY_ID}\\)\\.replace\\(#{RJS_PATTERN_HTML}\\)", :chained_replace_html => "\\$\\(#{RJS_ANY_ID}\\)\\.update\\(#{RJS_PATTERN_HTML}\\)", :replace_html => "Element\\.update\\(#{RJS_ANY_ID}, #{RJS_PATTERN_HTML}\\)", :replace => "Element\\.replace\\(#{RJS_ANY_ID}, #{RJS_PATTERN_HTML}\\)", :redirect => "window.location.href = #{RJS_ANY_ID}" }

RJS_ANY_ID = "\"([^\"])*\""

RJS_PATTERN_HTML = "\"((\\\\\"|[^\"])*)\""

Attributes

Show files where this module is defined (1 file)
Register or log in to add new notes.