aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/connections/mysql_connection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/connections/mysql_connection.rb')
-rw-r--r--spec/support/connections/mysql_connection.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/support/connections/mysql_connection.rb b/spec/support/connections/mysql_connection.rb
new file mode 100644
index 0000000000..66a53b5037
--- /dev/null
+++ b/spec/support/connections/mysql_connection.rb
@@ -0,0 +1,16 @@
+puts "Using native MySQL"
+require "active_record"
+require 'logger'
+
+ActiveRecord::Base.logger = Logger.new("debug.log")
+
+ActiveRecord::Base.configurations = {
+ 'unit' => {
+ :adapter => 'mysql',
+ :username => 'root',
+ :encoding => 'utf8',
+ :database => 'arel_unit',
+ }
+}
+
+ActiveRecord::Base.establish_connection 'unit'