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

Version Path
cantango-core-0.1.9.3 spec/migration_helper.rb
cantango-core-0.1.9.2 spec/migration_helper.rb
cantango-core-0.1.9.1 spec/migration_helper.rb
cantango-core-0.1.9 spec/migration_helper.rb
cantango-core-0.1.8 spec/migration_helper.rb
cantango-core-0.1.7 spec/migration_helper.rb
cantango-core-0.1.6 spec/migration_helper.rb
cantango-core-0.1.5 spec/migration_helper.rb
cantango-core-0.1.4 spec/migration_helper.rb