From f04142ea281c16182132ca4f307f24e97a19cfdc Mon Sep 17 00:00:00 2001 From: Mykhailo Kotsur Date: Thu, 22 Mar 2012 20:38:03 +0100 Subject: docs(guide/unit-testing): fixed typo in code example --- docs/content/guide/dev_guide.unit-testing.ngdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/content') diff --git a/docs/content/guide/dev_guide.unit-testing.ngdoc b/docs/content/guide/dev_guide.unit-testing.ngdoc index a14ddd39..79af465b 100644 --- a/docs/content/guide/dev_guide.unit-testing.ngdoc +++ b/docs/content/guide/dev_guide.unit-testing.ngdoc @@ -92,8 +92,8 @@ State & Singletons} The class above is hard to test since we have to change global state:
-var oldXHR = glabal.xhr;
-glabal.xhr = function mockXHR() {};
+var oldXHR = global.xhr;
+global.xhr = function mockXHR() {};
var myClass = new MyClass();
myClass.doWork();
// assert that mockXHR got called with the right arguments
@@ -126,12 +126,12 @@ there is only one global variable to be reset).
The class above is hard to test since we have to change global state:
-var oldServiceLocator = glabal.serviceLocator;
-glabal.serviceLocator.set('xhr', function mockXHR() {});
+var oldServiceLocator = global.serviceLocator;
+global.serviceLocator.set('xhr', function mockXHR() {});
var myClass = new MyClass();
myClass.doWork();
// assert that mockXHR got called with the right arguments
-glabal.serviceLocator = oldServiceLocator; // if you forget this bad things will happen
+global.serviceLocator = oldServiceLocator; // if you forget this bad things will happen
--
cgit v1.2.3