class Accessibility::HasDescendentMatcher
Custom matcher for RSpec
to check if an element has the specified descendent element.
Public Instance Methods
description()
click to toggle source
@return [String]
# File lib/rspec/expectations/ax_elements.rb, line 92 def description "should have a descendent matching #{qualifier.describe}" end
failure_message_for_should()
click to toggle source
@return [String]
# File lib/rspec/expectations/ax_elements.rb, line 82 def failure_message_for_should "Expected #@ancestor to have descendent #{qualifier.describe}" end
failure_message_for_should_not()
click to toggle source
@return [String]
# File lib/rspec/expectations/ax_elements.rb, line 87 def failure_message_for_should_not "Expected #@ancestor to NOT have descendent #@result" end
matches?(ancestor)
click to toggle source
@param ancestor [AX::Element]
# File lib/rspec/expectations/ax_elements.rb, line 75 def matches? ancestor @ancestor = ancestor @result = ancestor.search(kind, filters, &block) !@result.blank? end