Sha256: 780764f9f0c357e8c88abc91fcb97c074cbd0832323866274754aef23754ba40

Contents?: true

Size: 755 Bytes

Versions: 25

Compression:

Stored size: 755 Bytes

Contents

print "Using native MySQL\n"
require_dependency 'models/course'
require 'logger'

RAILS_DEFAULT_LOGGER = Logger.new('debug.log')
RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
ActiveRecord::Base.logger = RAILS_DEFAULT_LOGGER

# GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
# GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';

ActiveRecord::Base.configurations = {
  'arunit' => {
    :adapter  => 'mysql',
    :username => 'rails',
    :encoding => 'utf8',
    :database => 'activerecord_unittest',
  },
  'arunit2' => {
    :adapter  => 'mysql',
    :username => 'rails',
    :database => 'activerecord_unittest2'
  }
}

ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
activerecord-2.1.1 test/connections/native_mysql/connection.rb
antfarm-0.3.0 rails/vendor/rails/activerecord/test/connections/native_mysql/connection.rb
antfarm-0.4.0 rails/vendor/rails/activerecord/test/connections/native_mysql/connection.rb
radiant-0.7.0 vendor/rails/activerecord/test/connections/native_mysql/connection.rb
radiant-0.7.1 vendor/rails/activerecord/test/connections/native_mysql/connection.rb