Class: CapybaraAccessibilityAudit::Auditor

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara_accessibility_audit/auditor.rb

Instance Method Summary collapse

Constructor Details

#initialize(test) ⇒ Auditor

Returns a new instance of Auditor.



5
6
7
# File 'lib/capybara_accessibility_audit/auditor.rb', line 5

def initialize(test)
  @test = test
end

Instance Method Details

#audit!(method) ⇒ Object



9
10
11
12
13
# File 'lib/capybara_accessibility_audit/auditor.rb', line 9

def audit!(method)
  if accessibility_audit_enabled && method.in?(accessibility_audit_after_methods) && javascript_enabled?
    assert_no_accessibility_violations(**accessibility_audit_options)
  end
end