Permalink
Browse files

Merge pull request #10333 from ikataitsev/move-test-method-to-tests

Move method used only in the test to the test code itself
  • Loading branch information...
2 parents e691272 + df0cb9e commit 3e067c07fc6b51126e7c200461cbf298c2f48048 @rafaelfranca rafaelfranca committed Apr 24, 2013
@@ -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 3e067c0

Please sign in to comment.