An RSpec-like test DSL in Ruby, from scratch
A walkthrough of building a tiny RSpec-style DSL (describe, it, expect, plus eq/contain matchers). Uses instance_eval to run blocks in the DSL context and lambdas as matchers: https://razorjack.net/implementing-dsl-in-ruby-rspec/
Post a comment