deep_cloneable 2.0.2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_helper.rb DELETED
@@ -1,42 +0,0 @@
1
- require 'rubygems'
2
- require 'yaml'
3
- require 'minitest/autorun'
4
-
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
-
8
- require 'active_record'
9
-
10
- def load_schema
11
- config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
12
-
13
- if defined?(ActiveSupport::BufferedLogger)
14
- ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new(File.dirname(__FILE__) + "/debug.log")
15
- else
16
- ActiveRecord::Base.logger = ActiveSupport::Logger.new(File.dirname(__FILE__) + "/debug.log")
17
- end
18
-
19
- db_adapter = ENV['DB']
20
- # no db passed, try one of these fine config-free DBs before bombing.
21
- db_adapter ||= begin
22
- require 'rubygems'
23
- require 'sqlite'
24
- 'sqlite'
25
- rescue MissingSourceFile
26
- begin
27
- require 'sqlite3'
28
- 'sqlite3'
29
- rescue MissingSourceFile
30
- end
31
- end
32
-
33
- if db_adapter.nil?
34
- raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
35
- end
36
- ActiveRecord::Base.establish_connection(config[db_adapter])
37
- load(File.dirname(__FILE__) + "/schema.rb")
38
- end
39
-
40
- load_schema
41
- require File.dirname(__FILE__) + '/../init.rb'
42
- require 'models'