Closed thegedge closed 7 years ago
Haha... @imran-iq I struggled so hard to create a system of units and names for things that don't actually exist.
Added assert_raises_with_message
to our test helper and updated the two tests. I'd actually like to add some new exception types to be more explicit (I'll cut an issue for that), in which case the message will become less relevant (but still no harm!)
Previously we had
to_unit_name
, but this method could raise, so it should have a bang suffix.I've resolved this by having both
to_unit_name
andto_unit_name!
, and using theraise
-ing nature ofto_unit_name!
to simplifyMeasurable#initialize
.