Class: RuboCop::Cop::RSpecRails::MinitestAssertions::MatchAssertion
- Inherits:
-
BasicAssertion
- Object
- BasicAssertion
- RuboCop::Cop::RSpecRails::MinitestAssertions::MatchAssertion
- Defined in:
- lib/rubocop/cop/rspec_rails/minitest_assertions.rb
Overview
:nodoc:
Constant Summary collapse
- MATCHERS =
i[ assert_match refute_match ].freeze
Instance Attribute Summary
Attributes inherited from BasicAssertion
#actual, #expected, #failure_message
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BasicAssertion
#initialize, #negated?, #replaced
Constructor Details
This class inherits a constructor from RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion
Class Method Details
.match(matcher, actual, failure_message) ⇒ Object
227 228 229 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 227 def self.match(matcher, actual, ) new(matcher, actual, .first) end |
.minitest_assertion(node) ⇒ Object
223 224 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 223 def_node_matcher 'self.minitest_assertion', "(send nil? {:a\n" # rubocop:disable InternalAffairs/NodeMatcherDirective |
Instance Method Details
#assertion ⇒ Object
231 232 233 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 231 def assertion "match(#{expected})" end |