Sha256: fa8a3eee3ec66aca06b67db218f24caff374a0f333e23dfc0f2827add496ce03

Contents?: true

Size: 487 Bytes

Versions: 5

Compression:

Stored size: 487 Bytes

Contents

# frozen_string_literal: true

module ConnectionHelper
  def run_without_connection
    original_connection = ActiveRecord::Base.remove_connection
    yield original_connection.configuration_hash
  ensure
    ActiveRecord::Base.establish_connection(original_connection)
  end

  # Used to drop all cache query plans in tests.
  def reset_connection
    original_connection = ActiveRecord::Base.remove_connection
    ActiveRecord::Base.establish_connection(original_connection)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ibm_db-5.5.0 test/support/connection_helper.rb
ibm_db-5.4.1 test/support/connection_helper.rb
ibm_db-5.4.0 test/support/connection_helper.rb
ibm_db-5.3.2 test/support/connection_helper.rb
ibm_db-5.3.1 test/support/connection_helper.rb