spec/models/shard_spec.rb in switchman-1.4.4 vs spec/models/shard_spec.rb in switchman-1.5.0
- old
+ new
@@ -301,9 +301,11 @@
connection.expects(:schema_search_path=).with(nil).once
connection.stubs(:shard).returns(Shard.default)
connection.expects(:shard=).with(shard)
connection.stubs(:adapter_name).returns('PostgreSQL')
connection.stubs(:run_callbacks).returns(nil)
+ connection.stubs(:_run_checkin_callbacks).returns(nil)
+ connection.stubs(:owner).returns(Thread.current)
::ActiveRecord::ConnectionAdapters::ConnectionPool.any_instance.stubs(:checkout).returns(connection)
begin
expect(shard.name).to eq 'canvas'
ensure
shard.activate { ::ActiveRecord::Base.connection_pool.current_pool.disconnect! }