aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-01-30 10:53:14 -0800
committerYehuda Katz <wycats@gmail.com>2009-01-30 10:53:19 -0800
commitda10673e32718d6a0619bd0f4b4d3d796db86a1a (patch)
tree7bdb7868b0be65daec06ba729f68deccfe61a8bb /activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb
parentb8fadd708b9850a77e1f64038763fffcff502499 (diff)
parented0e5640879fd42c00fc5900e0355a0ea1dcf2ad (diff)
downloadrails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.tar.gz
rails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.tar.bz2
rails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.zip
Sync 'rails/rails/master'
Diffstat (limited to 'activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb')
-rw-r--r--activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb b/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb
new file mode 100644
index 0000000000..0685da4433
--- /dev/null
+++ b/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb
@@ -0,0 +1,26 @@
+print "Using Postgrsql via JRuby, activerecord-jdbc-adapter and activerecord-postgresql-adapter\n"
+require_dependency 'models/course'
+require 'logger'
+
+ActiveRecord::Base.logger = Logger.new("debug.log")
+
+# createuser rails --createdb --no-superuser --no-createrole
+# createdb -O rails activerecord_unittest
+# createdb -O rails activerecord_unittest2
+
+ActiveRecord::Base.configurations = {
+ 'arunit' => {
+ :adapter => 'jdbcpostgresql',
+ :username => ENV['USER'] || 'rails',
+ :database => 'activerecord_unittest'
+ },
+ 'arunit2' => {
+ :adapter => 'jdbcpostgresql',
+ :username => ENV['USER'] || 'rails',
+ :database => 'activerecord_unittest2'
+ }
+}
+
+ActiveRecord::Base.establish_connection 'arunit'
+Course.establish_connection 'arunit2'
+