Sha256: 648407123ba2c648d49f5a47b9acb991545f73d68ded239763ddb419e8a7b010

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

configs = YAML.load_file(File.join(File.dirname(__FILE__), 'databases.yml'))
ActiveRecord::Base.configurations = configs

db_name = ENV['DB'] || 'sqlite'
ActiveRecord::Base.establish_connection(db_name)
ActiveRecord::Base.default_timezone = :utc

load_schema = lambda {
  load File.join(File.dirname(__FILE__), "../dummy/db/schema.rb") # use db agnostic schema by default
  ActiveRecord::Migrator.up(File.join(File.dirname(__FILE__), '../../db/migrate')) # use migrations
}
silence_stream(STDOUT, &load_schema)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
socialite-0.2.1 spec/support/database_loader.rb