Bummer! This is just a preview. You need to be signed in with a Treehouse account to view the entire video.
Fixing Pending Todo List Deletion Tests1:40 with Jason Seifer
Now that we've re-implemented the functionality in our application, we can also fix our pending tests.
Okay, so I just ran the test suite again, and we're gonna go ahead and
knock out all of these different pending warnings.
So, the next one we'll take a look at is this deleting todo lists, and
that is in /spec/features/todo_ lists/destroy_spec.
So, let's go ahead and open that up.
So we'll go ahead and get this pending line out of here,
and now we can just run it again.
Okay, unable to find link "Destroy", and
that is probably because we changed it to Delete.
If we open up our todo_ items, index.html,
it is Delete.
So we can change our Destroy spec to say, Delete.
Now this is looking at the old markup, too, so instead of visiting todo lists,
and then inside of that particular todo list,
we'll say click_link todo_list.title.
Now we can click the Delete link, and the rest of our test should still work.
So let me clear my screen here and run that again.
Okay, one example, zero failures.
Let me do a git status, and I will say,
"Fix pending test to delete todo lists" Okay, perfect.
You need to sign up for Treehouse in order to download course files.Sign up