Lightning Talk DRYing up RSpec
summary
Three-minute lightning rundown of concrete RSpec DRY tactics: use shared_examples and shared_contexts, helper modules, looping constructs and custom matchers, and pass variables into shared examples so one template covers variants. Practical rules: wait for actual duplication, run tests green before refactor, stop when readability suffers. Notes that shared groups come in four variants and naming matters, and that using describe_class enables small Ruby metaprogramming shortcuts to apply examples across controllers.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:27Why DRY tests?
- 0:51DRYing Rules of Thumb
- 1:14Shared Examples are...
- 1:32A Shared Example Example
- 1:53Quick Tips








