Skip to content

argami/cashier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cashier Build Status Codacy Badge

cashier kata

Description

To this evaluation i have 2 versions:

  • Main branch is the more "complex" version
  • MVP branch is the more simpler version of the same.

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.

TODO

  • 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

About

cashier kata

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages