aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/connections/oracle_connection.rb
blob: 05be04e410f68794485d47ca0724fddc38719a42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
puts "Using native Oracle"
require "active_record"
require 'logger'

# Prepend oracle_enhanced local development directory in front of load path
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../oracle-enhanced/lib"

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

ActiveRecord::Base.configurations = {
  'unit' => {
    :adapter  => 'oracle_enhanced',
    :username => 'arel_unit',
    :password => 'arel_unit',
    :database => 'orcl',
  }
}

ActiveRecord::Base.establish_connection 'unit'