From the course: Ruby: Testing with RSpec

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Installing

Installing - Ruby Tutorial

From the course: Ruby: Testing with RSpec

Start my 1-month free trial

Installing

- In this chapter, we will learn how to use RSpec with Ruby on Rails. As we've seen by now, you don't need Rails to use RSpec. RSpec will test any Ruby code, but Rails has made RSpec popular. The chances are very good that if you came here to learn RSpec, you're hoping to use it with Ruby on Rails. If that's the case, I'm going to assume that you already have Ruby on Rails installed and that you know how to use it. If not, you'll want to first check out my Ruby on Rails Essential Training course first. The first thing you need to know about RSpec with Ruby on Rails is that it requires a different RubyGem: rspec-rails. You can find out details about this gem from the GitHub repository at github.com/rspec/rspec-rails. When you include this gem in your Rails application, it adds two things. It adds the regular Rspec Gem, and it adds a library of helpers to make testing in Rails much easier. The content in this chapter is mostly going to cover those Rails-specific additions, the…

Contents