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
Many of our projects use Shoulda Matchers.
Find out what it does.
Add specs for some validations in your MovieDB.