Going on a Testing Anti-Pattern Safari
summary
Catalog of concrete anti patterns and fixes plus measurable wins: tests must be trustworthy and simple; stop testing ActiveRecord (example: asserting find on a created record) and delete useless assertions like assert_nothing_raised; stub time and use relative dates to fix flaky time sensitive tests; randomize order (RSpec --order rand, minitest default) to expose order dependencies; mock external APIs (webmock or a stub Requestor) and cut a 0.25s call to <0.001s; use CI and refuse red builds.
AI-written summary · about
chapters (14)
- 0:00PLATINUM SPONSOR
- 2:34Overview
- 4:02Not Running Tests
- 5:28Testing OPC
- 9:17Time Sensitive
- 12:19Order Dependent
- 14:36Default Run Orders
- 14:55How To Randomize
- 16:04Tests That Can't Fail
- 18:11Require External Resources
- 24:45Complicated Setup
- 25:49Messy Tests
- 26:32Test Refactoring
- 27:36Slow tests








