From 21e81da33570ba9453831cfc59c4f42ff9cdc1b2 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Mon, 2 Aug 2010 01:37:57 -0700 Subject: update tests for mysql2 support --- .../test/connections/native_mysql2/connection.rb | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 activerecord/test/connections/native_mysql2/connection.rb (limited to 'activerecord/test/connections/native_mysql2/connection.rb') diff --git a/activerecord/test/connections/native_mysql2/connection.rb b/activerecord/test/connections/native_mysql2/connection.rb new file mode 100644 index 0000000000..c6f198b1ac --- /dev/null +++ b/activerecord/test/connections/native_mysql2/connection.rb @@ -0,0 +1,25 @@ +print "Using native Mysql2\n" +require_dependency 'models/course' +require 'logger' + +ActiveRecord::Base.logger = Logger.new("debug.log") + +# GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost'; +# GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost'; + +ActiveRecord::Base.configurations = { + 'arunit' => { + :adapter => 'mysql2', + :username => 'rails', + :encoding => 'utf8', + :database => 'activerecord_unittest', + }, + 'arunit2' => { + :adapter => 'mysql2', + :username => 'rails', + :database => 'activerecord_unittest2' + } +} + +ActiveRecord::Base.establish_connection 'arunit' +Course.establish_connection 'arunit2' -- cgit v1.2.3