Sha256: 8048fa23b970ca8035ac34bf7e49d001aae78ba227ac2a39bd6360d803a16155
Contents?: true
Size: 477 Bytes
Versions: 9
Compression:
Stored size: 477 Bytes
Contents
require 'active_record' require 'database_cleaner' path = File.dirname(__FILE__) + '/db/database.yml' dbfile = File.open(path) dbconfig = YAML::load(dbfile) ActiveRecord::Base.establish_connection(dbconfig) # ActiveRecord::Base.logger = Logger.new(STDERR) DatabaseCleaner.strategy = :truncation def migration_folder File.join(File.dirname(__FILE__), 'active_record') end def migrate! ActiveRecord::Migrator.migrate File.join(File.dirname(__FILE__), 'active_record') end
Version data entries
9 entries across 9 versions & 1 rubygems