Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 1.89 KB

README.md

File metadata and controls

78 lines (51 loc) · 1.89 KB

InstaBlog

CI/CD Dependabot Status

Setup

Prerequisites

Create .env file at the root of the project directory. Copy the content of .env.template.erb to .env then update the username and password based on your database credentials. To send a post feedback email to the blog post author, request SENDGRID_API_KEY from admin/owner or create your own SENDGRID_API_KEY and add single sender verification then update SENDGRID_FROM_EMAIL and SENDGRID_FROM_NAME

Install dependencies and setup database

bin/setup

Populate database with sample data

rake db:populate_sample_data

Start local web server

bin/dev

Go to http://localhost:3000

Testing

Setup test database

bin/rails db:test:prepare

Default: Run all spec files (i.e., those matching spec/**/*_spec.rb)

bin/rspec

Run all spec files in a single directory (recursively)

bin/rspec spec/models

Run a single spec file

bin/rspec spec/models/post_spec.rb

Use the plain-English descriptions to generate a report of where the application conforms to (or fails to meet) the spec

bin/rspec --format documentation spec/models/post_spec.rb

Run a single example from a spec file (by line number)

bin/rspec spec/models/post_spec.rb:6

See all options for running specs

bin/rspec --help