Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Getting to 100%
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Great, now you'll see that our last
method is this toString method.
0:00
Let's see if we can add a test for that.
0:06
Give a little room.
0:11
And we're going to add a test,
0:14
function canCallRecipeDirectly.
0:22
We're gonna add a new recipe.
0:34
And we're going to
AssertStringContainsString.
0:39
The following methods are available.
0:51
And the $recipe.
1:01
Let's run our test.
1:05
Great, we have 100% code
coverage on our Recipe class.
1:07
But remember, that doesn't mean
we're testing all scenarios.
1:12
For example, we are not testing that
our title is transformed to title case,
1:16
even when entering all lowercase letters.
1:22
Some of the use cases may come to
us in the form of a bug report.
1:25
If we add tests that test for those bugs,
we can be sure that we will not
1:29
reintroduce them once we
have fixed those bugs.
1:34
Why don't you practice your
test skills by adding tests for
1:37
our other classes,
the RecipeCollection and the Renderer.
1:41
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up