aboutsummaryrefslogtreecommitdiffstats
path: root/spec/connections/postgresql_connection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/connections/postgresql_connection.rb')
-rw-r--r--spec/connections/postgresql_connection.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/connections/postgresql_connection.rb b/spec/connections/postgresql_connection.rb
new file mode 100644
index 0000000000..505dcdd1ef
--- /dev/null
+++ b/spec/connections/postgresql_connection.rb
@@ -0,0 +1,12 @@
+require "activerecord"
+puts "Using native PostgreSQL"
+
+ActiveRecord::Base.configurations = {
+ 'unit' => {
+ :adapter => 'postgresql',
+ :encoding => 'utf8',
+ :database => 'arel_unit',
+ }
+}
+
+ActiveRecord::Base.establish_connection 'unit'