def format_usage_message(cart)
cart.usage_rates.map do |rate, plans|
plans = plans.map(&:capitalize) if plans
if plans && plans.length > 1
"This cartridge costs an additional $#{rate} per gear after the first 3 gears on the #{plans[0...-1].join(', ')} and #{plans[-1]} plans."
elsif plans && plans.length == 1
"This cartridge costs an additional $#{rate} per gear after the first 3 gears on the #{plans.first} plan."
else
"This cartridge costs an additional $#{rate} per gear after the first 3 gears."
end
end
end