1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Test AR integration with jdbcsqlite3 adapter on jruby

This commit is contained in:
Jeremy Kemper 2009-02-06 13:27:50 -08:00
parent 9c2918d974
commit a5c98bb063

View file

@ -51,7 +51,8 @@ class ActiveRecordTestConnector
if Object.const_defined?(:ActiveRecord) if Object.const_defined?(:ActiveRecord)
defaults = { :database => ':memory:' } defaults = { :database => ':memory:' }
begin begin
options = defaults.merge :adapter => 'sqlite3', :timeout => 500 adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'
options = defaults.merge :adapter => adapter, :timeout => 500
ActiveRecord::Base.establish_connection(options) ActiveRecord::Base.establish_connection(options)
ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options }
ActiveRecord::Base.connection ActiveRecord::Base.connection