Sha256: 400beaec3ab21e05bdf86154e635162276ef36b0bb76295a948a5137860193f9
Contents?: true
Size: 695 Bytes
Versions: 7
Compression:
Stored size: 695 Bytes
Contents
module Helpers def configs { db1: { adapter: "sqlite3", database: "tmp/db1.sqlite" }, db2: { adapter: "sqlite3", database: "tmp/db2.sqlite" } } end def db(connection) connection.execute('PRAGMA database_list'). first['file']. split('/').last. split('.').first end def check_connections_clean_up Octoshark.configure({}) switcher = Octoshark.switcher Octoshark.with_connection(:default) { |connection| connection.execute("SELECT 1") } expect(switcher.connection_pools.map { |_, c| c.connections.count }.sum).to eq(1) yield expect(switcher.connection_pools.map { |_, c| c.connections.count }.sum).to eq(0) end end
Version data entries
7 entries across 7 versions & 1 rubygems