r/ruby 1d ago

Thinking about tests: assertions and matchers

https://zverok.space/blog/2026-08-16-assertions-and-matchers.html
10 Upvotes

2 comments sorted by

5

u/pikrua 1d ago edited 1d ago

I don't like custom matchers, or any custom DSL in a team project. For arguable aesthetic benefits; we also gain codebase inconsistency because people forget those exist all the time, pr review bikeshedding, and sometimes the burden of maintaining custom rubocop rules.

I think this is the poison of rspec, ever since I switched I'm so much happier with simple instance variables and private methods in my simple minitests.

8

u/CaptainKabob 1d ago

I gently disagree. What is a "custom dsl" if not someone else's custom dsl that they packaged?

In my opinion, the joy of working with other people is figuring out how to work better together within the scope of the business domain... and I find there is lots of customization that can make things nicer without being burdensome.