From 77fa5fa5f7cc21824edb5b1c1ebccd58f92e982b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 27 Sep 2010 13:12:15 -0700 Subject: to_sql on nodes may be passed an engine --- spec/support/fake_record.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'spec/support') 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 -- cgit v1.2.3