Skip to content

Instantly share code, notes, and snippets.

@rplugge
Created June 9, 2015 16:59
Show Gist options
  • Save rplugge/caa006e2a5811d8a50b9 to your computer and use it in GitHub Desktop.
Save rplugge/caa006e2a5811d8a50b9 to your computer and use it in GitHub Desktop.
Checksplitter Test
require "minitest/autorun"
require_relative "check_splitter.rb"
class CheckSplitterTest < Minitest::Test
# Should initialize with 3 arguements (meal_cost, tip_percentage, number_of_people)
# meal_cost & tip_percentage should be floats.
# number_of_people should be an integer.
# tip should divide tip_percentage by 100 to get the decimal percentage
# should multiply that by mealcost
# should return total cost of the tip - Float
# total_cost should add the meal_cost and the tip
# should return total cost of meal - Float
# total_split should split the total cost of the meal by number_of_people
# should return each persons split - Float
end
@sumeetjain
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment