Sha256: 8ca785885590a84cacbd372922d47a9877cf90fc26bf0820c192d0243ebdf156
Contents?: true
Size: 607 Bytes
Versions: 44
Compression:
Stored size: 607 Bytes
Contents
# frozen_string_literal: true require 'capybara/rspec/matchers/base' module Capybara module RSpecMatchers module Matchers class HaveText < WrappedElementMatcher def element_matches?(el) el.assert_text(*@args) end def element_does_not_match?(el) el.assert_no_text(*@args) end def description "text #{format(text)}" end def format(content) content.inspect end private def text @args[0].is_a?(Symbol) ? @args[1] : @args[0] end end end end end
Version data entries
44 entries across 44 versions & 3 rubygems