class Capybara::RSpecMatchers::HaveText
Public Class Methods
new(*args)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 139 def initialize(*args) @args = args.dup @content = args[0].is_a?(Symbol) ? args[1] : args[0] end
Public Instance Methods
description()
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 152 def description "text #{format(@content)}" end
does_not_match?(actual)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 148 def does_not_match?(actual) wrap_does_not_match?(actual) { |el| el.assert_no_text(*@args) } end
format(content)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 156 def format(content) content.inspect end
matches?(actual)
click to toggle source
# File lib/capybara/rspec/matchers.rb, line 144 def matches?(actual) wrap_matches?(actual) { |el| el.assert_text(*@args) } end