When it comes to debugging, you can fight with Ruby's dynamic nature... Or you can embrace it. A little just-in-time metaprogramming can give you a clear window into unexpected behavior.
Tests can be communicative from multiple angles. How well does your assertion state intent when we read the code? On failure, does your message point us in the right direction?
The quickness and convenience of Ruby Struct with the expressiveness of keyword arguments? Learn how to make the most of this relatively recent Ruby addition.
A test is only helpful if you can understand its failures. In today's episode, I'll show you one of my favorite techniques for making test output readable and intent-revealing.