~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

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