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: goldiloader_spec.rb
    path of file: ./repos/goldiloader/spec/goldiloader
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spec_helper'

describe Goldiloader do
  let!(:author1) do
    User.create!(name: 'author1') { |u| u.address = Address.new(city: 'author1-city') }
  end

  let!(:author2) do
    User.create!(name: 'author2') { |u| u.address = Address.new(city: 'author2-city') }
  end

  let!(:author3) do
    User.create!(nam
    
    def create_attachment(owner:, name:)
      key = SecureRandom.hex

      ActiveStorage::Blob.service.upload(key, StringIO.open('hello world'))

      blob = ActiveStorage::Blob.create!(
        key: key,
        filename: "#{owner.class}/#{owner.id}.file",
        byte_size: 128,
        checksum: 'abc',
        content_type: 'text'
      )

      ActiveStorage::Attachment.create!(
        name: name,
        record: owner,
        blob: blob
      )
    end