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:
parent
9c2918d974
commit
a5c98bb063
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue