Class: RuboCop::Cop::RSpecRails::MinitestAssertions::EqualAssertion
- Inherits:
-
BasicAssertion
- Object
- BasicAssertion
- RuboCop::Cop::RSpecRails::MinitestAssertions::EqualAssertion
- Defined in:
- lib/rubocop/cop/rspec_rails/minitest_assertions.rb
Overview
:nodoc:
Constant Summary collapse
- MATCHERS =
%i[ assert_equal assert_not_equal refute_equal ].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(expected, actual, failure_message) ⇒ Object
82 83 84 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 82 def self.match(expected, actual, ) new(expected, actual, .first) end |
.minitest_assertion(node) ⇒ Object
78 79 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 78
def_node_matcher 'self.minitest_assertion', <<~PATTERN # rubocop:disable InternalAffairs/NodeMatcherDirective
(send nil? {:assert_equal :asser
|
Instance Method Details
#assertion ⇒ Object
86 87 88 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 86 def assertion "eq(#{expected})" end |