Clean RSpec: A Workshop on Ruby Testing Craftsmanship
summary
Workshop shows concrete RSpec refactors: it uses the gilded rose kata and live code exercises to rename ambiguous subject, replace hidden setup with let bang or explicit arrange blocks, and reorganize specs into clear three-phase test pattern arrange/act/assert and focused describe/context/it groups. It argues against expect any_instance_of and shared examples, demonstrates replacing implementation-heavy doubles with injected stubs or real collaborators, and leaves working examples and a repo to fork and practice.
AI-written summary · about
chapters (15)
- 0:00Start
- 4:37Code Kata
- 8:24Audience Participation
- 9:57Integration Test
- 10:55The Magic Tricks of Testing
- 13:10Testing a Query Method and How Do You Go about Testing a Command Method
- 30:04Arrange Phase
- 35:35Rid of Extraneous Assertions
- 36:21Three-Phase Test Pattern
- 36:59The Three-Phase Test Pattern
- 39:47Is It Recommended to Nest Context
- 44:18Shared Examples
- 50:59Test Doubles
- 51:42Breaking Up with Your Test Suite
- 52:05Value of Tdd
related talks
42mWorkshop / Taming Chaotic Specs: RSpec Design Patterns
02h 19mWorkshop - Taming Chaotic Specs: RSpec Design Patterns
20mApplying RSpec Best Practices
04mLightning Talk DRYing up RSpec
50mWriting Solid Ruby Code
16mTDD Workshop: Mocking, Stubbing, and Faking External Services
20mMake it SPECtacular
54mTDD Workshop: Outward-in Development, Unit Tests, and Fixture Data
