diff options
| author | Mykhailo Kotsur | 2012-03-22 20:38:03 +0100 | 
|---|---|---|
| committer | Igor Minar | 2012-03-26 16:06:16 -0700 | 
| commit | f04142ea281c16182132ca4f307f24e97a19cfdc (patch) | |
| tree | 9402d9006aa4577d7ec09235bd7a2db67298ee27 /docs/content/guide/dev_guide.unit-testing.ngdoc | |
| parent | aaedefb92e6bec6626e173e5155072c91471596a (diff) | |
| download | angular.js-f04142ea281c16182132ca4f307f24e97a19cfdc.tar.bz2 | |
docs(guide/unit-testing): fixed typo in code example
Diffstat (limited to 'docs/content/guide/dev_guide.unit-testing.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.unit-testing.ngdoc | 10 | 
1 files changed, 5 insertions, 5 deletions
| 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:  <pre> -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:  <pre> -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  </pre> | 
