back to

Ruby on Rails To-do List

ARCHIVED

Archived: This project has been archived. Cards can no longer be completed.

Creating Methods in Tests

Stefy
Stefy completed this card.
def create_todo_list(options={})
options[:title] ||= "My todo list"

Option title is conditionally equal to My todo list --> In other words: If we do not send in a title, it's going to be by default "My todo list". If we do send a title, it will be whatever it is we send in. 
Here we added the method to the tests


See how we added the "options" following the first screenshot


Run git diff to see the actual difference (after git status):

git diff