Class: Dommy::Rails::RSpec::Matchers::HaveNoInvalidAriaReferences
- Inherits:
-
Object
- Object
- Dommy::Rails::RSpec::Matchers::HaveNoInvalidAriaReferences
- Defined in:
- lib/dommy/rails/rspec/matchers.rb
Instance Method Summary collapse
- #description ⇒ Object
- #does_not_match?(actual) ⇒ Boolean
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
- #matches?(actual) ⇒ Boolean
Instance Method Details
#description ⇒ Object
616 617 618 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 616 def description "have no invalid ARIA references" end |
#does_not_match?(actual) ⇒ Boolean
612 613 614 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 612 def does_not_match?(actual) !matches?(actual) end |
#failure_message ⇒ Object
620 621 622 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 620 def "expected no invalid ARIA references, found #{@issues.size} issues" end |
#failure_message_when_negated ⇒ Object
624 625 626 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 624 def "expected invalid ARIA references" end |
#matches?(actual) ⇒ Boolean
607 608 609 610 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 607 def matches?(actual) @issues = Dommy::Rails::Lint.invalid_aria_references(MatchTarget.document(actual)) @issues.empty? end |