1 print
"Using Postgrsql via JRuby, activerecord-jdbc-adapter and activerecord-postgresql-adapter\n"
2 require_dependency
'models/course'
5 ActiveRecord
::Base.logger
= Logger
.new("debug.log")
7 # createuser rails --createdb --no-superuser --no-createrole
8 # createdb -O rails activerecord_unittest
9 # createdb -O rails activerecord_unittest2
11 ActiveRecord
::Base.configurations
= {
13 :adapter => 'jdbcpostgresql',
14 :username => ENV['USER'] || 'rails',
15 :database => 'activerecord_unittest'
18 :adapter => 'jdbcpostgresql',
19 :username => ENV['USER'] || 'rails',
20 :database => 'activerecord_unittest2'
24 ActiveRecord
::Base.establish_connection
'arunit'
25 Course
.establish_connection
'arunit2'