Method: Capybara::Node::Matchers#assert_no_text
- Defined in:
- lib/capybara/node/matchers.rb
#assert_no_text(type, text, options = {}) ⇒ true #assert_no_text(text, options = {}) ⇒ true
Asserts that the page or current node doesn’t have the given text content, ignoring any HTML tags.
541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/capybara/node/matchers.rb', line 541 def assert_no_text(*args) query = Capybara::Queries::TextQuery.new(*args) synchronize(query.wait) do count = query.resolve_for(self) matches_count = Capybara::Helpers.matches_count?(count, query.) if matches_count && ((count > 0) || Capybara::Helpers.expects_none?(query.)) raise Capybara::ExpectationNotMet, query. end end return true end |