class RuboCop::Cop::Minitest::MultipleAssertions

def assertions_count_in_assignment(node)

def assertions_count_in_assignment(node)
  unless node.masgn_type?
    return 0 unless node.expression # for-style loop
    return assertions_count_based_on_type(node.expression)
  end
  rhs = node.children.last
  case rhs.type
  when :array
    rhs.children.sum { |child| assertions_count_based_on_type(child) }
  when :send
    assertion_method?(rhs) ? 1 : 0
  else
    # Play it safe and bail if we don't have any explicit handling for whatever
    # the RHS type is, since at this point we're already probably dealing with
    # a pretty exotic situation that's unlikely in the real world.
    0
  end
end