Sha256: c0b06e259482402e652095c968be265080494f50738b868c95546804472257f9
Contents?: true
Size: 428 Bytes
Versions: 3
Compression:
Stored size: 428 Bytes
Contents
def reconnectdb require 'puppet-herald' require 'active_record' require 'stringio' # silence the output $stdout = StringIO.new # from migrator PuppetHerald::database.dbconn = 'sqlite3://:memory:' ActiveRecord::Base.establish_connection(PuppetHerald::database.spec) ActiveRecord::Base.logger.level = 2 unless ActiveRecord::Base.logger.nil? ActiveRecord::Migrator.up "db/migrate" $stdout = STDOUT end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppet-herald-0.8.1 | spec/support/reconnectdb.rb |
puppet-herald-0.8.0 | spec/support/reconnectdb.rb |
puppet-herald-0.2.0 | spec/support/reconnectdb.rb |