RSpec in depth
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
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.
- Nested example groups
- Shared examples
- Shared examples with parameters
- Stubbing of existing methods
- Expectations: Setting constraints and Configuring responses
- Any instance
- Message chains
- Mock objects (or “doubles”)
- Verifying doubles
A lot of our projects require rspec_candy.
This is a collection of tools and helpers for RSpec test suites.
Get an overview of what
rspec_candy can do. Note how some of its features are now part of modern RSpec versions!
Many of our projects use Shoulda Matchers.
Find out what it does.
Add specs for some validations in your MovieDB.