diff options
Diffstat (limited to 'spec/support/fake_record.rb')
-rw-r--r-- | spec/support/fake_record.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/support/fake_record.rb b/spec/support/fake_record.rb index 2aba0c10f2..30c49f2b16 100644 --- a/spec/support/fake_record.rb +++ b/spec/support/fake_record.rb @@ -63,14 +63,11 @@ module FakeRecord class Spec < Struct.new(:config) end - attr_reader :spec + attr_reader :spec, :connection def initialize @spec = Spec.new('sqlite3') - end - - def connection - Connection.new + @connection = Connection.new end def with_connection @@ -79,11 +76,13 @@ module FakeRecord end class Base - def self.connection_pool - ConnectionPool.new + attr_accessor :connection_pool + + def initialize + @connection_pool = ConnectionPool.new end - def self.connection + def connection connection_pool.connection end end |