Running RSpec

RSpec is a Behaviour-Driven Development tool for Ruby programmers. BDD is an approach to software development that combines Test-Driven Development, Domain Driven Design, and Acceptance Test-Driven Planning. RSpec helps you do the TDD part of that equation, focusing on the documentation and design aspects of TDD. (RSpec Documentation)

When you create a new Rails app, put -T at the end of the command like this

>> rails new sample_app -T

Install rspec

>> gem install rspec-rails

Install bundle

>> bundle install

Install files needed by Rails to run rspec

>> rails generate rspec:install

To run the rspec

>> bundle exec rspec spec/