aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/connections/postgresql_connection.rb
blob: 0fb6dfe065282585eae39db5dc0dab401e76116e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
puts "Using native PostgreSQL"
require "active_record"
require 'logger'

ActiveRecord::Base.logger = Logger.new("debug.log")

ActiveRecord::Base.configurations = {
  'unit' => {
    :adapter  => 'postgresql',
    :encoding => 'utf8',
    :database => 'arel_unit',
  }
}

ActiveRecord::Base.establish_connection 'unit'