From 3b10b8a201d9fbef831be81d7a4bc9b82c75a6f4 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 5 Mar 2011 01:10:00 +0100 Subject: implements ActiveRecord::Base.connection_config to be able to check the configuration of the current connection at runtime --- activerecord/test/cases/pooled_connections_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/pooled_connections_test.rb b/activerecord/test/cases/pooled_connections_test.rb index 6269437b14..379cf5b44e 100644 --- a/activerecord/test/cases/pooled_connections_test.rb +++ b/activerecord/test/cases/pooled_connections_test.rb @@ -94,6 +94,11 @@ class PooledConnectionsTest < ActiveRecord::TestCase ActiveRecord::Base.connection_handler = old_handler end + def test_connection_config + ActiveRecord::Base.establish_connection(@connection) + assert_equal @connection, ActiveRecord::Base.connection_config + end + def test_with_connection_nesting_safety ActiveRecord::Base.establish_connection(@connection.merge({:pool => 1, :wait_timeout => 0.1})) -- cgit v1.2.3