This exercise is to help you learn how to write and pass tests.
To run the tests, run rake
on the command line. rake
is a Ruby program that
executes tasks from a file called a Rakefile
. It is often used by Ruby
libraries to run tests and other tasks.
Open test/card_test.rb
and lib/card.rb
in Atom. Go to the command line and
run rake
. You will see text about your tests failing. Change the Card
class
until your tests pass. Once your tests pass, uncomment the next test and make
it pass.
Repeat this for the Deck
class and test/deck_test.rb
.