Method: Capybara::Node::Matchers#assert_text
- Defined in:
- lib/capybara/node/matchers.rb
#assert_text(type, text, **options) ⇒ true #assert_text(text, **options) ⇒ true
Asserts that the page or current node has the given text content, ignoring any HTML tags.
675 676 677 678 679 680 681 |
# File 'lib/capybara/node/matchers.rb', line 675 def assert_text(type_or_text, *args, **opts) _verify_text(type_or_text, *args, **opts) do |count, query| unless query.matches_count?(count) && (count.positive? || query.expects_none?) raise Capybara::ExpectationNotMet, query. end end end |