Class: Dommy::Rails::RSpec::Matchers::HaveNoNestedInteractiveElements
- Inherits:
-
Object
- Object
- Dommy::Rails::RSpec::Matchers::HaveNoNestedInteractiveElements
- 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
685 686 687 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 685 def description "have no nested interactive elements" end |
#does_not_match?(actual) ⇒ Boolean
681 682 683 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 681 def does_not_match?(actual) !matches?(actual) end |
#failure_message ⇒ Object
689 690 691 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 689 def "expected no nested interactive elements, found #{@issues.size} issues" end |
#failure_message_when_negated ⇒ Object
693 694 695 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 693 def "expected nested interactive elements" end |
#matches?(actual) ⇒ Boolean
676 677 678 679 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 676 def matches?(actual) @issues = Dommy::Rails::Lint.nested_interactive_elements(MatchTarget.document(actual)) @issues.empty? end |