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

# Copyright (c) 2018-2024 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS
    
  def test_sends_with_no_decoy
    owner = random_owner
    list = Lists.new(owner: owner, pgsql: t_pgsql).add
    recipient = list.recipients.add('test11@mailanes.com')
    lane = Lanes.new(owner: owner, pgsql: t_pgsql).add
    campaign = Campaigns.new(owner: owner, pgsql: t_pgsql).add(list, lane)
    campaign.yaml = "title: hello\nspeed: 10"
    letter = lane.letters.add
    delivery = Deliveries.new(pgsql: t_pgsql).add(campaign, letter, recipient)
    RandomPort::Pool::SINGLETON.acquire do |port|
      Dir.mktmpdir do |dir|
        smtpd = FakeSMTPd::Runner.new(
          dir: File.join(dir, 'messages'),
          port: port,
          logfile: File.join(dir, 'smtpd.log'),
          pidfile: File.join(dir, 'smtpd.pid')
        )
        letter.yaml = [
          'from: test@mailanes.com',
          'smtp:',
          '  host: localhost',
          "  port: #{port}",
          '  user: test',
          '  password: test'
        ].join("\n")
        codec = GLogin::Codec.new('some secret')
        begin
          smtpd.start
          letter.deliver(recipient, codec, delivery: delivery)
        ensure
          smtpd.stop
        end
      end
    end