A Guided Read of Minitest
summary
Minitest claims huge compactness: 1,586 lines of Ruby versus RSpec’s ~15,000, and a tiny mocking file (minitest-mock.rb) about 28× smaller. The code actually uses lib files like lib/minitest/autorun.rb and minitest.rb to install an at-exit hook, it collects test classes via the Ruby inherited callback, it defines tests as methods named test_, and assertions are simple three-line helpers. Diff output delegates to the system Diff* tool. The build is literal, small, and works by leaning on Ruby and the standard library.
AI-written summary · about
chapters (18)
- 0:00Start
- 4:16The elephant in the room: RSpec
- 4:52INTERNET FIGHT
- 5:17This talk is about the philosophy of Minitest revealed through code.
- 5:51History Lesson
- 6:21Replacement for test/unit
- 6:41A code reader's best friend: cloc
- 7:27Minitest Comments + README: 1699 lines. Ruby code: 1586 lines.
- 8:49If Minitest is The Mouse and The Motorcycle (22,416 words) RSpec is Ulysses by James Joyce (265,000 words).
- 9:14Do Less With Less
- 12:22The largest file in Minitest is minitest.rb
- 25:15Pain is good. Pain is signal.
- 26:40Test Discovery?
- 30:14Use what is given.
- 31:11Defining Tests in Minitest
- 34:18Reduce the API surface
- 37:55Abstraction is the Enemy
- 39:29MINITEST A PHILOSOPHY OF PAIN








