diff options
author | Xavier Noria <fxn@hashref.com> | 2011-03-05 01:10:00 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-03-05 01:35:02 +0100 |
commit | 3b10b8a201d9fbef831be81d7a4bc9b82c75a6f4 (patch) | |
tree | fb2ece5916c226cdb0e00200bbc0286c1e9e110b /activerecord/test | |
parent | 28f1c21b50c17f9be9ea581c3a878186efb5b9ec (diff) | |
download | rails-3b10b8a201d9fbef831be81d7a4bc9b82c75a6f4.tar.gz rails-3b10b8a201d9fbef831be81d7a4bc9b82c75a6f4.tar.bz2 rails-3b10b8a201d9fbef831be81d7a4bc9b82c75a6f4.zip |
implements ActiveRecord::Base.connection_config to be able to check the configuration of the current connection at runtime
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/pooled_connections_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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})) |