You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_encodings.rb
    path of file: ./repos/artichoke/artichoke-backend/vendor/ruby/test/csv
    
    the code of the file until where you have to start completion: # -*- coding: utf-8 -*-
# frozen_string_literal: false

require_relative "h
    
  def test_encoding_is_upgraded_for_ascii_content_during_writing_as_needed
    data = ["foo".force_encoding("ISO-8859-1"), "\u3042"]
    assert_equal("ISO-8859-1", data.first.encoding.name)
    assert_equal("UTF-8",      data.last.encoding.name)
    assert_equal("UTF-8",      data.join('').encoding.name)
    assert_equal("UTF-8",      data.to_csv.encoding.name)
  end