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

describe FinalDestination::HTTP do
  before do
    #
    
  def expect_tcp_and_abort(stub_addr, &blk)
    success = Class.new(StandardError)
    TCPSocket.stubs(:open).with { |addr| stub_addr == addr }.once.raises(success)
    begin
      yield
    rescue success
    end