lib/rubocop/cop/mixin/predicate_assertion_handleable.rb in rubocop-minitest-0.20.1 vs lib/rubocop/cop/mixin/predicate_assertion_handleable.rb in rubocop-minitest-0.21.0

- old
+ new

@@ -4,11 +4,10 @@ module Cop module Minitest # Common functionality for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` cops. module PredicateAssertionHandleable MSG = 'Prefer using `%<assertion_type>s_predicate(%<new_arguments>s)`.' - RESTRICT_ON_SEND = %i[assert].freeze def on_send(node) return unless (arguments = peel_redundant_parentheses_from(node.arguments)) first_argument = arguments.first @@ -44,13 +43,10 @@ end def offense_message(arguments) message_argument = arguments.last if arguments.first != arguments.last - new_arguments = [ - new_arguments(arguments), - message_argument&.source - ].flatten.compact.join(', ') + new_arguments = [new_arguments(arguments), message_argument&.source].flatten.compact.join(', ') format(MSG, assertion_type: assertion_type, new_arguments: new_arguments) end def new_arguments(arguments)