cashier kata
To this evaluation i have 2 versions:
In both versions all the tests checks out. (Its all tested in travis, and code validated with Codacy)
I did some assumptions on how things should be constructed. I also avoid the use of gems. The only ones used are related with the testing framework.
- product price is required and has to be a positive value
- validate rules formating and set up default values
- when apply rule price, total price can't be lower than 0
- test cart without products shouldn't fail
- refactor rule
- refactor product
- create a rules manager
- needs a Rule#apply
- in rules should be unique products (related with rules manager)
- update readme
- should test Rules#each
- create a cart (no needed yet complexity is too low)
- extract the products and rule validation errors to its own error type