Permalink
Browse files

Move method used only in the test to the test code itself

  • Loading branch information...
ikataitsev committed Apr 24, 2013
1 parent 6f405df commit df0cb9e34cf922656426f8958a41b4bbe1a0058c
@@ -253,14 +253,6 @@ def initialize(spec)
@available = Queue.new self
end
- # Hack for tests to be able to add connections. Do not call outside of tests
- def insert_connection_for_test!(c) #:nodoc:
- synchronize do
- @connections << c
- @available.add c
- end
- end
-
# Retrieve the connection associated with the current thread, or call
# #checkout to obtain one if necessary.
#
@@ -2,6 +2,15 @@
module ActiveRecord
module ConnectionAdapters
+ class ConnectionPool
+ def insert_connection_for_test!(c)
+ synchronize do
+ @connections << c
+ @available.add c
+ end
+ end
+ end
+
class AbstractAdapterTest < ActiveRecord::TestCase
attr_reader :adapter

0 comments on commit df0cb9e

Please sign in to comment.