mass_insert 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_helper.rb DELETED
@@ -1,36 +0,0 @@
1
- require 'coveralls'
2
- Coveralls.wear!
3
-
4
- require 'simplecov'
5
- SimpleCov.start
6
-
7
- require 'logger'
8
- require 'minitest/autorun'
9
- require 'active_record'
10
- require 'mass_insert'
11
- require 'fileutils'
12
-
13
- adapter = ENV['DATABASE_ADAPTER'] || 'sqlite3'
14
-
15
- FileUtils.mkdir_p('tmp')
16
- FileUtils.mkdir_p('log')
17
-
18
- ActiveRecord::Base.logger = Logger.new('log/test.log')
19
- ActiveRecord::Base.logger.level = Logger::DEBUG
20
-
21
- database_configuration = YAML.load_file(File.dirname(__FILE__) + '/database.yml')[adapter]
22
- ActiveRecord::Base.configurations['test'] = database_configuration
23
- ActiveRecord::Base.establish_connection(:test)
24
-
25
- begin
26
- ActiveRecord::Base.connection
27
- rescue
28
- # Ensures database exists.
29
- ActiveRecord::Tasks::DatabaseTasks.database_configuration = database_configuration
30
- ActiveRecord::Tasks::DatabaseTasks.create_current('test')
31
- end
32
-
33
- require File.dirname(__FILE__) + '/schema.rb'
34
-
35
- Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each{ |file| require file }
36
- Dir[File.dirname(__FILE__) + "/models/**/*.rb"].each{ |file| require file }