Quick Recap

Let's review what we have covered so far.

Highlights

By now, using Docker should be starting to feel pretty familiar. Things got a little more tricky when it came to tests requiring JavaScript, but having a ready-made image with Selenium-driven Chrome made the installation of these a breeze and that is where Docker shines.✨

In summary:

  1. We set up and installed RSpec.
  2. We saw how to run our specs in a Dockerized environment.
  3. We set up system specs and ran tests using the default RackTest driver.
  4. We got our system specs to work even when JavaScript is required by configuring Capybara to use a Selenium-driven Chrome browser running in a separate container.
  5. We made our JavaScript system tests faster by configuring headless Chrome in normal use.
  6. We learned how to debug our application even though it is running inside a container.

What to expect in the next chapter?

Although we have gradually been leveling up our Docker skills, you may have noticed one area where things have felt sluggish: rebuilding our image still feels slow whenever we need to add or modify our gems.

In the next chapter, we will see what we can do to mitigate this and speed up image builds.

Get hands-on with 1200+ tech skills courses.