Skip to content

Install rspec rails

Banu Hapeloglu Kutlu edited this page Oct 8, 2018 · 2 revisions
  1. Add rspec-rails to the Gemfile:

    group :development, :test do
      gem 'rspec-rails'
    end
    
  2. $ bundle install

  3. $ rails generate rspec:install

    This adds the following files which are used for configuration:

    .rspec
    spec/spec_helper.rb
    spec/rails_helper.rb
    
  4. Use the rspec command to run specs:

    $ bundle exec rspec

Clone this wiki locally