The Second Test
Let’s write the second test and learn more about testing.
We'll cover the following...
The next test
One nice feature of test-driven development is that making one test pass often points to the next test. The goal of the next test cycle is to write a test that fails, given the current code. At this point, the code says that done?
is always true
, so we should create a case where done?
is false:
rsync -avr --progress /usercode/* /usr/local/educative/gatherer --exclude Gemfile --exclude Gemfile.lock --exclude execute.sh cd /usr/local/educative/gatherer npm install clear
Adding a new test in project_spec.rb file
This test is similar to the first one, but now we have a second class, Task
, and a related attribute of the Project
class, tasks
. This time we’re assuming that a new task is undone, and therefore a project with an undone task is ...