Sha256: 16daa90fd57dedd18aa1ab4e840f008a07f7b6f6d316d8e0b5b787f4d4537bf9
Contents?: true
Size: 854 Bytes
Versions: 4
Compression:
Stored size: 854 Bytes
Contents
require 'support/active_record/database_setup' require 'support/active_record/schema_setup' module MySQL2Helper puts "Active Record #{ActiveRecord::VERSION::STRING}, mysql2" # require 'logger' # ActiveRecord::Base.logger = Logger.new(STDERR) def config db_config['mysql2'] end def create_db establish_connection(config.merge(:database => nil)) ActiveRecord::Base.connection.drop_database config['database'] rescue nil ActiveRecord::Base.connection.create_database config['database'] end def establish_connection config = config ActiveRecord::Base.establish_connection config end def active_record_mysql2_setup create_db establish_connection load_schema end def active_record_mysql2_connection ActiveRecord::Base.connection end end RSpec.configure do |c| c.include MySQL2Helper end
Version data entries
4 entries across 4 versions & 2 rubygems