aboutsummaryrefslogtreecommitdiffstats
path: root/spec/connections/oracle_connection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/connections/oracle_connection.rb')
-rw-r--r--spec/connections/oracle_connection.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/connections/oracle_connection.rb b/spec/connections/oracle_connection.rb
new file mode 100644
index 0000000000..05be04e410
--- /dev/null
+++ b/spec/connections/oracle_connection.rb
@@ -0,0 +1,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'