In this workshop you'll continue writing unit tests in Ruby using MiniTest.
-
Clone the repo to your MacBook.
-
Take a look at the code in
lego.rb
. -
Create a PR and in it describe:
- each class
- the purpose of each method in the class
-
Next, identify the following:
- The expected behaviours (i.e. what does the method expect as input?).
- The limits of the cases of expected behaviour (i.e. how many arguments can the method take?) .
- Any exceptional/error cases.
-
Create a new file called
lego_test.rb
. -
In it, create tests for each of the above cases that you've identified. Remember to make commits along the way!
-
Push
lego_test.rb
to GitHub. -
Submit the link to your PR in Canvas.