class SpecDb

  TEST_DB_NAME="jam_websockets_test"

  def self.recreate_database
    conn = PG::Connection.open("dbname=postgres user=postgres password=postgres host=localhost")
    conn.exec("DROP DATABASE IF EXISTS #{TEST_DB_NAME}")
    conn.exec("CREATE DATABASE #{TEST_DB_NAME}")
    JamDb::Migrator.new.migrate(:dbname => TEST_DB_NAME, :user => "postgres", :password => "postgres", :host => "localhost")
  end

end
