Posted almost 4 years ago. Visible to the public.

RSpec in depth

Reading

Work through the following chapters from Everyday Rails Testing with RSpec (in our library), if you haven't read them yet:

  • Model specs
  • Generating test data with factories
  • Basic controller specs (we don't often write them, but sometimes they are useful)
  • Speeding up specs
  • Testing the rest

Also read through the documentation of both factory_bot (formerly known as factory_girl) and Machinist 1. These are the gems you will encounter for test data generation in our projects.

RSpec matchers

Get an overview of all the matchers that are build into RSpec:

Play with every other matcher in your MovieDB tests.

Write two custom matchers and use them in your MovieDB tests.

More RSpec features

Understand the following RSpec features. Try to use them in MovieDB where possible.

Shoulda matchers

Many of our projects use Shoulda Matchers.

Find out what it does.

Add specs for some validations in your MovieDB.

Owner of this card:

Avatar
Henning Koch
Last edit:
18 days ago
by Stefan Wagner
Posted by Henning Koch to makandra Curriculum
This website uses cookies to improve usability and analyze traffic.
Accept or learn more