Skip to main content

Install test db for running unit tests

  1. Make sure your docker container is running with posgress is running
  2. Download db dump https://drive.google.com/file/d/1XNnMsvW1isoxkEssFxEIDB7cJa__TwKr/view?usp=sharing
  3. Copy downloaded dump into docker posgres container:

    docker cp /your/local_path/powr_test.dump posgres_container_name_or_hash:/tmp/backup.dump

  4. Open terminal with posgres container:

    docker exec -it your_posgres_container_name_or_hash bash

  5. Login in posgres:

    psql -U postgres

  6. Create new database

    create database postgres_spec;

  7. Quit from psql console and restore dump

    \q

psql -U postgres postgres_spec < tmp/backup.dump 8. Open project terminal and run test rspec