Descriptive messages with basic asserts
What if I told you that it's possible to get helpful failure messages from basic
asserts using idiomatic equality
== checks? No DSLs in sight.
This is a proof of concept to demonstrate that it's possible... mostly to satisfy my own curiosity. The concepts here could theoretically be expanded to provide a useful extension to existing testing frameworks or perhaps lay a foundation for an entirely new one.
This experiment created with Ruby 3.0.1. Note to self: There's probably a way to do this with
TracePoint instead of monkey patching but I couldn't figure out how to get a reference to the passed variable being compared.