Mix.install([
{:jason, "~> 1.4"},
{:kino, "~> 0.9", override: true},
{:youtube, github: "brooklinjazz/youtube"},
{:hidden_cell, github: "brooklinjazz/hidden_cell"}
])
You're going to create a Stack
mix project similar to the Stack module you previously created.
$ mix new stack
Write a full test suite for the Stack
module and implement the functionality. Include at least the following test cases.
start_link/1 - default state
start_link/1 - default configuration
pop/1 - remove one element from stack
pop/1 - remove multiple elements from stack
pop/1 - remove element from empty stack
push/2 - add element to empty stack
push/2 - add element to stack with multiple elements
In addition to the above, add documentation and at least one doctest for the push/2
and pop/1
functions.
This will be a pair testing exercise Using TDD (Test Driven Development). We recommend using Visual Studio Code LiveShare to collaborate.
- One student (the tester) will write a single test
- The other student (the implementer) will implement only the code necessary to make the test pass.
- Swap roles after each test.
As the implementer you are encouraged to fake your solution (within reason) if the test allows for it. This will encourage your tester to write a better test.
DockYard Academy now recommends you use the latest Release rather than forking or cloning our repository.
Run git status
to ensure there are no undesirable changes.
Then run the following in your command line from the curriculum
folder to commit your progress.
$ git add .
$ git commit -m "finish Tested Stack exercise"
$ git push
We're proud to offer our open-source curriculum free of charge for anyone to learn from at their own pace.
We also offer a paid course where you can learn from an instructor alongside a cohort of your peers. We will accept applications for the June-August 2023 cohort soon.