lib/rubocop/cop/mixin/minitest_cop_rule.rb in rubocop-minitest-0.10.3 vs lib/rubocop/cop/mixin/minitest_cop_rule.rb in rubocop-minitest-0.11.0
- old
+ new
@@ -27,9 +27,10 @@
class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
include ArgumentRangeHelper
MSG = 'Prefer using `#{preferred_method}(%<new_arguments>s)` over ' \
'`#{assertion_method}(%<original_arguments>s)`.'
+ RESTRICT_ON_SEND = %i[#{assertion_method}].freeze
def on_send(node)
return unless node.method?(:#{assertion_method})
return unless (arguments = peel_redundant_parentheses_from(node.arguments))
return unless arguments.first.respond_to?(:method?) && arguments.first.method?(:#{target_method})