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

module Database
  module TriggerHelpers
    def expect_function_to_exist(name)
      expect(find_function_def(name)).not_to be_nil
    end

    def expect_function_not_to_exist(name)
      expect(find_functio
    
    def expect_valid_function_trigger(table_name, name, fn_name, fires_on)
      events, timing, definition = cleaned_trigger_def(table_name, name)

      events = events&.split(',')
      expected_timing, expected_events = fires_on.first
      expect(timing).to eq(expected_timing.to_s)
      expect(events).to match_array(Array.wrap(expected_events))

      expect(definition).to match(%r{execute (?:procedure|function) #{fn_name}()})
    end