lib/switchman/test_helper.rb in switchman-1.3.18 vs lib/switchman/test_helper.rb in switchman-1.4.0
- old
+ new
@@ -14,11 +14,10 @@
Shard.default(true)
end
# can't auto-create a new shard on the default shard's db server if the
# default shard is split across multiple db servers
- if (::Rails.version < '4' ? ::ActiveRecord::Base.connection_handler.connection_pools.length :
- ::ActiveRecord::Base.connection_handler.connection_pool_list.length) > 1
+ if ::ActiveRecord::Base.connection_handler.connection_pool_list.length > 1
server1 = DatabaseServer.create(:config => Shard.default.database_server.config)
else
server1 = Shard.default.database_server
end
server2 = DatabaseServer.create(:config => Shard.default.database_server.config)
\ No newline at end of file