Host events? You deserve an upgrade.

The people behind the scenes (or one, bad-ass individual) are unsung heroes. A great event, class, or show can simply make your day or completely change your perspective. But these folks behind the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Setting Up RSpec

Docker for Rails Developers — by Rob Isenberg (64 / 119)

👈 Chapter 8 Testing in a Dockerized Environment | TOC | Our First Test 👉

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:

First, let’s stop our web service:

Next, we need to rebuild our image to run bundle install, and then create a new container from it:

Next we need to install RSpec, setting up its file structure:

With RSpec set up, we’re able to run the specs like so:

However, as you’d expect, this reports that we have no specs currently:

Let’s take RSpec for a proper test-drive by creating…

👈 Chapter 8 Testing in a Dockerized Environment | TOC | Our First Test 👉

Add a comment

Related posts:

Loving Me

But how do I know who I am? How can I love me when I don’t know me? I don’t actually love me. I love what people think of me. I love the way people look at me. I love when people listen to me. I love…

Acknowledgments

Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can't always articulate their ideas clearly enough for you to turn them into code. You need Cucumber: a testing, communication, and requirements tool-all rolled into one. All the code in this book is updated for Cucumber 2.4,

Further Exploration

Write code that writes code with Elixir macros. Macros make metaprogramming possible and define the language itself. In this book, you'll learn how to use macros to extend the language with fast, maintainable code and share functionality in ways you never thought possible. You'll discover how to extend Elixir with your own firs