diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-04 18:30:17 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-04 18:30:17 +0000 |
commit | 5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4 (patch) | |
tree | 6f6a24850538fb1f3ae046caa2a0e067e6bd474b /actionpack | |
parent | ab416b4dde0a6216fdfec909abc553b8bec6bb73 (diff) | |
download | rails-5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4.tar.gz rails-5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4.tar.bz2 rails-5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4.zip |
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
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/active_record_assertions_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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' |