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: shared_examples_for_backup_store.rb
    path of file: ./repos/discourse/spec/lib/backup_restore
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# rubocop:disable Discourse/OnlyTopLevelMultisiteSpecs

RSpec.shared_context "with backups" do
  before { create_backups }
  after { remove_backups }

  # default backup files
  let(:backup1) do
    BackupFile.new(
      filename: "b.tar.gz",
      size: 17,
      last_modified: Time.parse("2018-09-13T15:10:00Z"),
    )
  end
  let(:backup2) do
    BackupFile.new(filename: "a.tgz", si
    
      def upload_file
        # time has fidelity issues freeze a time that is not going to be prone
        # to that
        freeze_time(Time.now.to_s)

        backup = BackupFile.new(filename: "foo.tar.gz", size: 33, last_modified: Time.zone.now)

        expect(store.files).to_not include(backup)

        Tempfile.create(backup.filename) do |file|
          file.write("A" * backup.size)
          file.close

          store.upload_file(backup.filename, file.path, "application/gzip")
        end

        expect(store.files).to include(backup)
        expect(store.file(backup.filename)).to eq(backup)
      end