Skip to content

Instantly share code, notes, and snippets.

@gizipp
Created March 24, 2020 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gizipp/a776489bf1a9710678861cca600075d1 to your computer and use it in GitHub Desktop.
Save gizipp/a776489bf1a9710678861cca600075d1 to your computer and use it in GitHub Desktop.
Rspec Setup in Rails 6
  1. Add rspec-rails in development and test group
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'sqlite3', '~> 1.4'
  gem 'rspec-rails', '~> 3.9.0'
end

and bundle install

  1. Remove test folder if any and run rails generate rspec:install to create spec folder and it's config
Running via Spring preloader in process 95671
    create  .rspec
    create  spec
    create  spec/spec_helper.rb
    create  spec/rails_helper.rb
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment