Sha256: b83bca24248a80bd42a2d431c06f8f7d394808431ebf22f6bef7f9827eb86b15

Contents?: true

Size: 1018 Bytes

Versions: 4

Compression:

Stored size: 1018 Bytes

Contents

require 'coveralls'
Coveralls.wear!

require 'simplecov'
SimpleCov.start

require 'logger'
require 'minitest/autorun'
require 'active_record'
require 'mass_insert'
require 'fileutils'

adapter = ENV['DATABASE_ADAPTER'] || 'sqlite3'

FileUtils.mkdir_p('tmp')
FileUtils.mkdir_p('log')

ActiveRecord::Base.logger = Logger.new('log/test.log')
ActiveRecord::Base.logger.level = Logger::DEBUG

database_configuration = YAML.load_file(File.dirname(__FILE__) + '/database.yml')[adapter]
ActiveRecord::Base.configurations['test'] = database_configuration
ActiveRecord::Base.establish_connection(:test)

begin
  ActiveRecord::Base.connection
rescue
  # Ensures database exists.
  ActiveRecord::Tasks::DatabaseTasks.database_configuration = database_configuration
  ActiveRecord::Tasks::DatabaseTasks.create_current('test')
end

require File.dirname(__FILE__) + '/schema.rb'

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each{ |file| require file }
Dir[File.dirname(__FILE__) + "/models/**/*.rb"].each{ |file| require file }

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mass_insert-0.2.6 test/test_helper.rb
mass_insert-0.2.5 test/test_helper.rb
mass_insert-0.2.4 test/test_helper.rb
mass_insert-0.2.3 test/test_helper.rb