lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.31.0 vs lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.31.1
- old
+ new
@@ -103,11 +103,10 @@
return false if !node.send_type? && !node.block_type? && !node.numblock_type?
ASSERTION_PREFIXES.any? do |prefix|
method_name = node.method_name
- # TODO: Remove the fllowing `to_s` since Ruby 2.7 that supports `Symbol#start_with?`.
- method_name.to_s.start_with?(prefix) || node.method?(:flunk)
+ method_name.start_with?(prefix) || node.method?(:flunk)
end
end
def lifecycle_hook_method?(node)
node.def_type? && LIFECYCLE_HOOK_METHODS.include?(node.method_name)