aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-11-09 14:36:58 +0000
committerJon Leighton <j@jonathanleighton.com>2012-11-09 14:40:15 +0000
commitc3ca7ac09e960fa1287adc730e8ddc713e844c37 (patch)
treeecf535dda05ab03d137decd9611fa9110ce4573d /activerecord/test/cases
parent52538dda134fc287d0d903c0b3e17e5c0f9177a9 (diff)
downloadrails-c3ca7ac09e960fa1287adc730e8ddc713e844c37.tar.gz
rails-c3ca7ac09e960fa1287adc730e8ddc713e844c37.tar.bz2
rails-c3ca7ac09e960fa1287adc730e8ddc713e844c37.zip
Properly deprecate ConnectionHandler#connection_pools
Rather than just changing it and hoping for the best. Requested by @jeremy: https://github.com/rails/rails/commit/ba1544d71628abff2777c9c514142d7e9a159111#commitcomment-2106059
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/connection_adapters/connection_handler_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb
index 631bf1aaac..2ddabe058f 100644
--- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb
+++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb
@@ -8,7 +8,7 @@ module ActiveRecord
@subklass = Class.new(@klass)
@handler = ConnectionHandler.new
- @handler.establish_connection @klass, Base.connection_pool.spec
+ @pool = @handler.establish_connection(@klass, Base.connection_pool.spec)
end
def test_retrieve_connection
@@ -44,6 +44,12 @@ module ActiveRecord
assert_same @handler.retrieve_connection_pool(@klass),
@handler.retrieve_connection_pool(@subklass)
end
+
+ def test_connection_pools
+ assert_deprecated do
+ assert_equal({ Base.connection_pool.spec => @pool }, @handler.connection_pools)
+ end
+ end
end
end
end