Skip to content
Browse files

Merge pull request #8594 from amatsuda/rm_sqlite2

I don't think we're supporting SQLite 2
  • Loading branch information...
2 parents 33e52d3 + a2ce1de commit c80fcce91ac8eb40d8d7a5b827c1507038fa644a @guilleiguaran guilleiguaran committed Dec 23, 2012
Showing with 5 additions and 13 deletions.
  1. +5 −13 actionpack/test/active_record_unit.rb
View
18 actionpack/test/active_record_unit.rb
@@ -45,19 +45,11 @@ def setup
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

0 comments on commit c80fcce

Please sign in to comment.
Something went wrong with that request. Please try again.