Class: Axe::AccessibilityExpectation

Inherits:
Object
  • Object
show all
Defined in:
lib/axe/expectation.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page) ⇒ AccessibilityExpectation

Returns a new instance of AccessibilityExpectation.



19
20
21
# File 'lib/axe/expectation.rb', line 19

def initialize(page)
  @page = page
end

Class Method Details

.create(negate) ⇒ Object



15
16
17
# File 'lib/axe/expectation.rb', line 15

def self.create(negate)
  negate ? InaccessibleExpectation.new : AccessibleExpectation.new
end

Instance Method Details

#to(matcher) ⇒ Object



23
24
25
# File 'lib/axe/expectation.rb', line 23

def to(matcher)
  AccessibleExpectation.new.assert @page, matcher
end

#to_not(matcher) ⇒ Object Also known as: not_to



27
28
29
# File 'lib/axe/expectation.rb', line 27

def to_not(matcher)
  InaccessibleExpectation.new.assert @page, matcher
end