Sha256: 4bc5ff025087d0bab3f791e5dba96e0c2720e1ff82965eac4ebd80e0a02564a7
Contents?: true
Size: 624 Bytes
Versions: 3
Compression:
Stored size: 624 Bytes
Contents
require "spec_helper" module Switchman describe ConnectionPoolProxy do include RSpecHelper it "should not share connections for sqlite shards on the same db" do @db = DatabaseServer.create(:config => { :adapter => 'sqlite3', :database => ':memory:' }) @sqlite_shard1 = @db.shards.create! @sqlite_shard2 = @db.shards.create! ::ActiveRecord::Base.connection.should_not == @sqlite_shard2.activate { ::ActiveRecord::Base.connection } @sqlite_shard1.activate { ::ActiveRecord::Base.connection }.should_not == @sqlite_shard2.activate { ::ActiveRecord::Base.connection } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
switchman-1.2.2 | spec/lib/connection_pool_proxy_spec.rb |
switchman-1.2.1 | spec/lib/connection_pool_proxy_spec.rb |
switchman-1.2.0 | spec/lib/connection_pool_proxy_spec.rb |