Class: Dommy::Rails::RSpec::Matchers::HaveNoMissingFormLabels
- Inherits:
-
Object
- Object
- Dommy::Rails::RSpec::Matchers::HaveNoMissingFormLabels
- 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
639 640 641 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 639 def description "have no missing form labels" end |
#does_not_match?(actual) ⇒ Boolean
635 636 637 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 635 def does_not_match?(actual) !matches?(actual) end |
#failure_message ⇒ Object
643 644 645 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 643 def "expected no missing form labels, found #{@issues.size} issues" end |
#failure_message_when_negated ⇒ Object
647 648 649 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 647 def "expected missing form labels" end |
#matches?(actual) ⇒ Boolean
630 631 632 633 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 630 def matches?(actual) @issues = Dommy::Rails::Lint.missing_form_labels(MatchTarget.document(actual)) @issues.empty? end |