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: callback_spec.rb
    path of file: ./repos/jruby/spec/ffi
    
    the code of the file until where you have to start completion: #
# This file is part of ruby-ffi.
# For licensing, see LICENSE.SPECS
#

require File.e
    
    def assert_callback_in_same_thread_called_once
      called = 0
      thread = nil
      yield proc {
        called += 1
        thread = Thread.current
      }
      expect(called).to eq(1)
      expect(thread).to eq(Thread.current)
    end