Module: Webrat::HaveTagMatcher
- Defined in:
- lib/webrat/core/matchers/have_tag.rb
Defined Under Namespace
Classes: HaveTag
Instance Method Summary collapse
-
#assert_have_no_tag(name, attributes = {}) ⇒ Object
Asserts that the body of the response does not contain the supplied string or regepx.
-
#assert_have_tag(name, attributes = {}) ⇒ Object
Asserts that the body of the response contains the supplied tag with the associated selectors.
- #have_tag(name, attributes = {}, &block) ⇒ Object (also: #match_tag)
Instance Method Details
#assert_have_no_tag(name, attributes = {}) ⇒ Object
Asserts that the body of the response does not contain the supplied string or regepx
65 66 67 68 |
# File 'lib/webrat/core/matchers/have_tag.rb', line 65 def assert_have_no_tag(name, attributes = {}) ht = HaveTag.new([name, attributes]) assert !ht.matches?(response_body), ht. end |
#assert_have_tag(name, attributes = {}) ⇒ Object
Asserts that the body of the response contains the supplied tag with the associated selectors
58 59 60 61 |
# File 'lib/webrat/core/matchers/have_tag.rb', line 58 def assert_have_tag(name, attributes = {}) ht = HaveTag.new([name, attributes]) assert ht.matches?(response_body), ht. end |