Custom RSpec matchers for blocks, and the Ruby magic behind their inner workings
In RSpec it is possible to define special custom matchers that enable us to test, with a neat syntax, what happens when some code is executed, while also helping reduce duplication.
This blog post shows how to define such matchers and how they work behind the scenes thanks to Ruby’s magic.
Custom RSpec matchers for blocks, and the Ruby magic behind their inner workings
Post a comment