How I Learned to Stop Worrying and Love Unit Testing
summary
Argues that fast unit tests drive safer refactors and cleaner design, showing RSpec expect examples, advising one test per branch and an upfront failing test for bugs, and recommending CI so a green build turning red pins the offending commit. Suggests using Timecop for time issues and stubbing external calls with VCR or webmock, measuring progress with Coveralls and aiming to raise coverage incrementally (try +5% goals).
AI-written summary · about
chapters (7)
- 0:00Intro
- 0:11HOW I LEARNED TO STOP WORRYING AND LOVE UNIT TESTING
- 3:18To all viewers but yourself, what matters is the product: the finished artwork. To you, and you alone, what matters is the process
- 8:09ENCOURAGING GOOD PRACTICES Tests are the canary in the coal mine; when the design is bad, testing is hard.
- 11:07You make good work by (among other things) making lots of work that isn't very good, and gradually weeding out the parts that aren't good
- 16:11Whether other methods are called . Whether a job is enqueued • If something is truthy/falsey • If an exception is thrown
- 23:08TIME Developer time • Computational time • The passage of time








