From 5e9835b4f245346b3c79f5e4927c9accfb57a50d Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 23 Jan 2014 17:26:23 +0000 Subject: docs(ngdoc): ensure module installation docs are accurate The ngMock module is built into a package called angular-mocks, which is not named consistently and the docs were giving invalid info. Closes #5810 --- docs/src/ngdoc.js | 8 ++++++++ src/ngMock/angular-mocks.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 77c01b77..83aa992e 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -1401,6 +1401,14 @@ function explainModuleInstallation(moduleName){ modulePackage = 'angular-' + moduleName, modulePackageFile = modulePackage + '.js'; + // Deal with inconsistent ngMock naming - doing it verbosely and explicitly here + // rather than cleverly interweaving it in the previous lines to make it obvious + // what is going on + if ( moduleName == 'mock' ) { + modulePackage = 'angular-mocks'; + modulePackageFile = modulePackage + '.js'; + } + return '
First include ' + modulePackageFile +' in your HTML:
' +
     '    <script src="angular.js">\n' +
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index 292ef4af..74b9c2d6 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -1729,7 +1729,7 @@ angular.mock.$RootElementProvider = function() {
  * In addition, ngMock also extends various core ng services such that they can be
  * inspected and controlled in a synchronous manner within test code.
  *
- * {@installModule mocks}
+ * {@installModule mock}
  *
  * 
  *
-- 
cgit v1.2.3