From 5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 4 Jul 2005 18:30:17 +0000 Subject: r2788@asus: jeremy | 2005-07-04 16:16:20 -0700 Don't unnecessarily pollute $:. Use SQLite3 instead of SQLite by default. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/active_record_assertions_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actionpack/test/controller/active_record_assertions_test.rb') diff --git a/actionpack/test/controller/active_record_assertions_test.rb b/actionpack/test/controller/active_record_assertions_test.rb index 9b504c1f39..915750f667 100644 --- a/actionpack/test/controller/active_record_assertions_test.rb +++ b/actionpack/test/controller/active_record_assertions_test.rb @@ -1,6 +1,6 @@ path_to_ar = File.dirname(__FILE__) + '/../../../activerecord' -if Object.const_defined?("ActiveRecord") || File.exist?(path_to_ar) +if Object.const_defined?(:ActiveRecord) || File.exist?(path_to_ar) # This test is very different than the others. It requires ActiveRecord to # run. There's a bunch of stuff we are assuming here: @@ -12,11 +12,12 @@ if Object.const_defined?("ActiveRecord") || File.exist?(path_to_ar) begin - driver_to_use = 'native_sqlite' + driver_to_use = 'native_sqlite3' - $: << path_to_ar + '/lib/' + unless Object.const_defined?("ActiveRecord") + require File.join(path_to_ar, 'lib', 'active_record') unless Object.const_defined?(:ActiveRecord) + end $: << path_to_ar + '/test/' - require 'active_record' unless Object.const_defined?("ActiveRecord") require "connections/#{driver_to_use}/connection" require 'fixtures/company' -- cgit v1.2.3