← Graph

Custom DSL for Specs

concept 1 connections

Kristoff's core thesis on using RSpec correctly. To turn tests into true specs (tests written for humans), teams must leverage RSpec's built-ins — custom matchers, helper DSLs, and shared examples. Example: a matcher that asserts an operation returns a decorated object; higher-level helpers that read as 'I'm stubbing a policy, I'm stubbing a service'. Techniques like 'with every combination' remove 200-line manual cases or awkward sample/collection loops and produce better failure messages. Without this discipline, teams end up writing tests with RSpec that would be cleaner as minitest or testbench.

category
practice
about
Custom DSL for Specs concept
Recommends custom matchers and DSLs to actually leverage RSpec.

Provenance

Created in
wroclove.rb 2025 lightning talks 2026-04-18 08:03
Read by
2 extractions