February 2019
Intermediate to advanced
240 pages
5h 25m
English
Now that our app is configured correctly with Compose, setting up RSpec is going to be very familiar. Let’s whiz through this quickly.
Following the instructions from rspec-rails,[41] we need to add the following to our Gemfile:
| | group :development, :test do |
| | # Call 'byebug' anywhere in the code to stop execution and get a debugger… |
| | gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] |
| » | gem 'rspec-rails', '~> 3.8' |
| | end |
First, let’s stop our web service:
| | $ docker-compose stop web |
Next, we need to rebuild our image to run bundle install, and then create a new container from it:
| | $ docker-compose build web |
| | Building web |
| | Step 1/12 : FROM ruby:2.6 |
| | ... |
| | Step 7/12 : RUN apt-get update ... |