Sha256: 467174d98b4a87b8e2b8758cbcb52a68d2fbee51291d1e5828de083942979832
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'rubygems' require 'yaml' require 'sqlite3' gem 'minitest' require 'minitest/autorun' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'active_record' I18n.enforce_available_locales = true def load_schema config = YAML.load(IO.read(File.dirname(__FILE__) + '/database.yml')) ActiveRecord::Base.logger = if defined?(ActiveSupport::BufferedLogger) ActiveSupport::BufferedLogger.new(File.dirname(__FILE__) + '/debug.log') else ActiveSupport::Logger.new(File.dirname(__FILE__) + '/debug.log') end db_adapter = ENV['DB'] db_adapter ||= 'sqlite3' raise 'No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3.' if db_adapter.nil? ActiveRecord::Base.establish_connection(config[db_adapter]) load(File.dirname(__FILE__) + '/schema.rb') end load_schema require File.dirname(__FILE__) + '/../init.rb' require 'models'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deep_cloneable-3.0.0 | test/test_helper.rb |