Skip to content

pedroafonsoms/contacts-api

Repository files navigation

Contacts-API

A simple project using Rails to implement some tests. In this project is possible see tests in models, controllers (requests) and serializers.

The project ERM (Entity Relational Model) is as shown in the image below.

ERM

Setup

Prerequisites

1 - Ruby

To install Ruby, I recommended use rbenv (Just follow the instructions in link)

2 - Postgres

To install Postgres, I recommended use Docker (This link is the official image of the Postgres)

Dependencies

1 - Install all dependencies of the project

bundle install

2 - Initialize and run migrates in database

rails db:create & rails db:migrate

Obs: Don't forget to go up your database before run the command above

Tests

All the tests uses the FactoryBot to control the base of the tests and FFaker to generate some datas

To run all tests in project, simple run:

rspec

About

Sample API project to implement some tests

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages