diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-12-23 19:28:24 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-12-23 19:28:24 -0800 |
commit | c80fcce91ac8eb40d8d7a5b827c1507038fa644a (patch) | |
tree | 8456b5db5348c39e99069a9a8e8b36c267e8d328 /actionpack/test | |
parent | 33e52d379e9379cc1a6b9afbb1f650f5ad56074d (diff) | |
parent | a2ce1de14e5f7b8b535e21cc89f31fc6851d96c8 (diff) | |
download | rails-c80fcce91ac8eb40d8d7a5b827c1507038fa644a.tar.gz rails-c80fcce91ac8eb40d8d7a5b827c1507038fa644a.tar.bz2 rails-c80fcce91ac8eb40d8d7a5b827c1507038fa644a.zip |
Merge pull request #8594 from amatsuda/rm_sqlite2
I don't think we're supporting SQLite 2
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/active_record_unit.rb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/actionpack/test/active_record_unit.rb b/actionpack/test/active_record_unit.rb index 4dd7406798..95fbb112c0 100644 --- a/actionpack/test/active_record_unit.rb +++ b/actionpack/test/active_record_unit.rb @@ -45,19 +45,11 @@ class ActiveRecordTestConnector def setup_connection if Object.const_defined?(:ActiveRecord) defaults = { :database => ':memory:' } - begin - adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' - options = defaults.merge :adapter => adapter, :timeout => 500 - ActiveRecord::Base.establish_connection(options) - ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } - ActiveRecord::Base.connection - rescue Exception # errors from establishing a connection - $stderr.puts 'SQLite 3 unavailable; trying SQLite 2.' - options = defaults.merge :adapter => 'sqlite' - ActiveRecord::Base.establish_connection(options) - ActiveRecord::Base.configurations = { 'sqlite2_ar_integration' => options } - ActiveRecord::Base.connection - end + adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' + options = defaults.merge :adapter => adapter, :timeout => 500 + ActiveRecord::Base.establish_connection(options) + ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } + ActiveRecord::Base.connection Object.send(:const_set, :QUOTED_TYPE, ActiveRecord::Base.connection.quote_column_name('type')) unless Object.const_defined?(:QUOTED_TYPE) else |