Everyday Rails Testing with RSpec
by Aaron Sumner
$39
Have you built a couple of Rails applications, but are struggling with reliable test coverage? Does your application testing consist of clicking around in the browser, hoping you catch everything before your customers do?
It's a common experience for new Ruby on Rails developers! Testing and test-driven development are crucial, but many tutorials don't delve deeply into these components. In Everyday Rails Testing with RSpec, you'll learn tried-and-true techniques for writing clear, effective, maintainable tests in RSpec—in turn, building more trustworthy features for your customers, and saving countless hours refreshing your browser.
Everyday Rails Testing with RSpec currently covers Ruby 4.0 and Rails 8.1.
Contents:
Introduction
Setting up RSpec
Model specs
DRY specs 1
Generating test data with factories
Testing controllers
Request specs
System specs
DRY specs 2
Writing tests faster
Testing the rest
Toward test-driven development
Parting advice