adamdwhite / RoR-TDD-currency-converter

continued exercise based on in-class demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test Driven Development (TDD)

  1. Write test
  2. Run test -> test fails
  3. Write code to make the test pass
  4. Run test -> test passes
  5. Refactor the code
  6. Run test -> test should still pass!
  7. (Rinse, Repeat)

Instructions for continuing work on in-class demo:

  1. Add tests for checking type of parameters passed into initialize. "currency_one" and "currency_two" should be strings. And "conversion_rate" should a number.

  2. Add tests for checking type of paramter "amount" for both conversion methods. It should be a number.

  3. The if-else in the convert_currency_two_to_one method needs to be tested. The if else gives you two different sceanrios that can happen and they both need to be tested.

About

continued exercise based on in-class demo


Languages

Language:Ruby 100.0%