Workshop / Taming Chaotic Specs: RSpec Design Patterns
summary
Claim: large, messy specs get tamed by concrete refactor patterns and small tooling choices. Workshop refactors a real 9,000+ line spec down using Minimum Valid Object, permutation tables and golden‑master snapshots, shows how RSpec predicate matchers, Factory Girl factories and the approvals gem produce fewer false positives and clearer failures, and demonstrates snapshot verification files and shared examples that replace repetitive cases. Examples run and verify that the refactored specs are readable, DRY and actually catch the intended validation errors.
AI-written summary · about
chapters (14)
- 0:00Start
- 2:49PROBLEM
- 5:30TAMING CHAOTIC SPECS RSpec Design Patterns
- 7:04Minimum Valid Object
- 7:502. Make one specific change
- 15:24RSpec Predicate Magic Methods
- 20:36Permutation Tables
- 27:03Golden Master
- 27:28visual confirmation
- 32:22Best Practices
- 34:51DESCRIPTIVE NAMING
- 36:28Extract Common Expectations
- 36:54Custom Matchers
- 37:54Factories over Fixtures
related talks
02h 19mWorkshop - Taming Chaotic Specs: RSpec Design Patterns
01h 04mClean RSpec: A Workshop on Ruby Testing Craftsmanship
20mApplying RSpec Best Practices
40mWorkshop - Simplifying Code: Monster to Elegant in Less Than 5 steps
16mTDD Workshop: Mocking, Stubbing, and Faking External Services
21mTaming Flaky Specs: Diagnosing Test Failures in Ruby
34mBetter Code Through Boring(er) Tests
06mAvoiding Sneaky Testing Antipatterns
