Reading RSpec — a journey of meta programming
summary
Reads RSpec source to show exactly how method.method + source_location locates describe, how describe uses module_eval/class.new to generate example group classes, how let is implemented by defining memoized instance methods inside a dynamically created module, and how it registers example groups into RSpec.world and runs them via runner.invoke → run → example_group.run → example.run. Demonstrates using Ruby introspection, grep-search and Vim to navigate files, points out surprising simplicity of many layers and the memoization pattern that makes let behave like cached defs.
AI-written summary · about
chapters (10)
- 0:00Intro
- 3:02About me
- 4:30Meta programming
- 5:10Object
- 7:51Code
- 12:57Subclass
- 20:52Class Methods
- 23:07Examples
- 25:04Run method
- 31:57Summary








