mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
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
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user