lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.25.1 vs lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.26.0
- old
+ new
@@ -76,10 +76,10 @@
send_nodes.select { |send_node| assertion_method?(send_node) }
end
def assertion_method?(node)
- return false unless node.send_type?
+ return false if !node.send_type? && !node.block_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?`.