Better code through boring(er) tests
summary
Tests get hated because they mirror bad code and brittle assumptions and this talk gives concrete fixes: stop directly testing private methods by making small methods public, extracting a class or adding introspection; remove duplication by extracting real application behavior into a repository pattern or class instead of shared test helpers; avoid “inventing the universe” setup by moving important setup into application-level factories (not just factory_girl shorthands) or by stubbing external HTTP with webmock to keep tests boring and refactorable.
AI-written summary · about
chapters (15)
- 0:00Start
- 5:06TESTING PRIVATE METHODS - THE PROBLEM
- 5:52TESTING PRIVATE METHODS - ALTERNATIVES
- 6:28TESTING PRIVATE METHODS - EXTRACT SIMPLE CLASS
- 7:12TESTING PRIVATE METHODS - DEFER THE DECISION
- 7:55DUPLICATE TESTS - THE PROBLEM
- 9:21DUPLICATE TESTS - THE SHARED EXAMPLE GROUP SMELL
- 10:26DUPLICATE TESTS - THE DIRECT MODULE TEST SMELL
- 10:49DUPLICATE TESTS - THE EXTRACT CLASS FIX
- 11:08DUPLICATE TESTS - THE KEY IDEA
- 11:45INVENTING THE UNIVERSE - THE PROBLEM
- 12:06INVENTING THE UNIVERSE - THE PREMATURE FIX SMELL
- 14:08INVENTING THE UNIVERSE - SHARED CONTEXT SMELL
- 16:24INVENTING THE UNIVERSE - FACTORY_GIRL SMELL
- 20:36A MAGIC TRICK








