currency exchange: add validation
currency exchange: add validation: a task in smol-software-harbor (Harbor dataset). Converting with a currency code that is not in the config raises a confusing KeyError from Exchange rate . Make rate raise ArgumentError with the message unknown currency: XYZ (the code that was asked for) instead…
The task
Converting with a currency code that is not in the config raises a confusing `KeyError` from `Exchange#rate`. Make `rate` raise `ArgumentError` with the message `unknown currency: XYZ` (the code that was asked for) instead. Run `ruby -Ilib test/exchange_test.rb`.
Part of efederici/smol-software-harbor.