From 69e4d40a76d9a600d03edfd18f7707bfe47596bb Mon Sep 17 00:00:00 2001 From: Shai Reznik Date: Mon, 14 Jan 2013 02:21:04 +0200 Subject: doc(guide): Fixed typos at the unit tests guide --- docs/content/guide/dev_guide.unit-testing.ngdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/content/guide/dev_guide.unit-testing.ngdoc') diff --git a/docs/content/guide/dev_guide.unit-testing.ngdoc b/docs/content/guide/dev_guide.unit-testing.ngdoc index 76d8bbc3..2006b1fc 100644 --- a/docs/content/guide/dev_guide.unit-testing.ngdoc +++ b/docs/content/guide/dev_guide.unit-testing.ngdoc @@ -42,10 +42,10 @@ There are several ways in which you can get a hold of a dependency: 1. You could create it using the `new` operator. 2. You could look for it in a well known place, also known as global singleton. 3. You could ask a registry (also known as service registry) for it. (But how do you get a hold of -the registry? Must likely by looking it up in a well known place. See #2) +the registry? Most likely by looking it up in a well known place. See #2) 4. You could expect that it be handed to you. -Out of the list above only the last option is testable. Let's look at why: +Out of the four options in the list above, only the last one is testable. Let's look at why: ### Using the `new` operator @@ -131,7 +131,7 @@ function MyClass() { } -However, where dose the serviceRegistry come from? if it is: +However, where does the serviceRegistry come from? if it is: * `new`-ed up, the the test has no chance to reset the services for testing * global look-up, then the service returned is global as well (but resetting is easier, since there is only one global variable to be reset). @@ -251,7 +251,7 @@ and the test is straight forward var pc = new PasswordCtrl(); pc.password('abc'); pc.grade(); -expect(span.strength).toEqual('weak'); +expect(pc.strength).toEqual('weak'); Notice that the test is not only much shorter but it is easier to follow what is going on. We say -- cgit v1.2.3