RSpec: It's Not Actually Magic
summary
Shows RSpec source step by step so the DSL stops feeling magical: how describe/it/expect/eq map to example groups, expectation targets and matchers, how blocks run via module_exec and class_exec, how implicit predicates and the implicit matcher work, and how mocks install method double proxies into an object’s singleton class to capture calls and verify expectations during teardown. Includes the emoji-as-syntax demo and concrete code paths so the mechanics and tradeoffs are clear.
AI-written summary · about
chapters (6)
- 0:00Start
- 2:07Reasons Why Our Spec Is Complicated
- 26:06Implicit Matcher
- 31:55Ruby Method Lookup
- 32:24The Singleton Class
- 37:36Rspec Documentation
related talks
33mReading RSpec — a journey of meta programming
22mRSpec: The Bad Parts
01h 04mClean RSpec: A Workshop on Ruby Testing Craftsmanship
04mLightning Talk DRYing up RSpec
20mApplying RSpec Best Practices
44mRuby Libraries Important for Rails
45mWhat does my Ruby do?
35mFrom RSpec to Jest: JavaScript testing for Rails devs
