This is an interview question for junior ruby developer @ Fandnext.
- Clone this project to your local environment
- Run
bundle install
in the project folder and make sure all the dependencies have been installed successfully. - Run
ruby test/price_calculation_test.rb
to see if you can run the test. You should see 6 failed test cases. - Take a look at
models/order.rb
,models/campaign.rb
andtest/price_calculation_test.rb
, and do your best to implement methods inprice_calculation.rb
; please do not modify files other thanprice_calculation.rb
- The project is considered accomplished if all test cases pass.