Class: RuboCop::Cop::RSpecRails::MinitestAssertions::EmptyAssertion
- Inherits:
-
BasicAssertion
- Object
- BasicAssertion
- RuboCop::Cop::RSpecRails::MinitestAssertions::EmptyAssertion
- Defined in:
- lib/rubocop/cop/rspec_rails/minitest_assertions.rb
Overview
:nodoc:
Constant Summary collapse
- MATCHERS =
%i[ assert_empty assert_not_empty refute_empty ].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(actual, failure_message) ⇒ Object
265 266 267 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 265 def self.match(actual, ) new(nil, actual, .first) end |
.minitest_assertion(node) ⇒ Object
261 262 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 261
def_node_matcher 'self.minitest_assertion', <<~PATTERN # rubocop:disable InternalAffairs/NodeMatcherDirective
(send nil? {:assert_empty :as
|
Instance Method Details
#assertion ⇒ Object
269 270 271 |
# File 'lib/rubocop/cop/rspec_rails/minitest_assertions.rb', line 269 def assertion 'be_empty' end |