title: How to fix the error 'Module is not available! You either misspelled the ...'
body: <p>I'm using Angularjs and Jasmine.</p>
  
  <p>I get the following error:</p>
  
  <pre><code>    Error: [$injector:modulerr] Failed to instantiate module myApplication due to:
      Error: [$injector:nomod] Module 'myApplication' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
      http://errors.angularjs.org/1.4.4/$injector/nomod?p0=myApplication
          at file:///Users/Documents/angularjs/code/src/lib/scripts/1_4_4/angular.js:68:12
  ...
  TypeError: Cannot read property 'amount' of undefined
      at UserContext.&lt;anonymous&gt; (file:///Users/Documents/angularjs/code/spec/tests/index_09_controller.spec.js:13:23)
  </code></pre>
  
  <p>my-template.html</p>
  
  <pre><code>&lt;html ng-app="myApplication"&gt;
  
  &lt;head&gt;
      &lt;script src="lib/scripts/1_4_4/angular.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div ng-controller="SimpleController"&gt;
          {{amount.length}}
      &lt;/div&gt;
  
      &lt;script&gt;
          var myModule = angular.module('myApplication', []);
  
          myModule.controller('SimpleController', function($scope) {
                  $scope.amount = ['a','b','c'];
          });
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>my-template.spec.js</p>
  
  <pre><code>describe('a simple controller', function(){
      var $scope;
  
      //See API angular.mock.module
      beforeEach(module('myApplication'));
  
      beforeEach( inject( function( $rootScope, $controller ){
          $scope = $rootScope.$new();
          $controller('SimpleController',{$scope : $scope});
      }));
  
      it('test scope amount', function(){
          expect($scope.amount.length).toBe(3);
      });
  });
  </code></pre>
  
  <p>SpecRunner.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Jasmine Spec Runner v2.8.0&lt;/title&gt;
  
    &lt;link rel="shortcut icon" type="image/png" href="lib/jasmine-2.8.0/jasmine_favicon.png"&gt;
    &lt;link rel="stylesheet" href="lib/jasmine-2.8.0/jasmine.css"&gt;
  
    &lt;script src="lib/jasmine-2.8.0/jasmine.js"&gt;&lt;/script&gt;
    &lt;script src="lib/jasmine-2.8.0/jasmine-html.js"&gt;&lt;/script&gt;
    &lt;script src="lib/jasmine-2.8.0/boot.js"&gt;&lt;/script&gt;
    &lt;script src="src/lib/scripts/1_4_4/angular.js"&gt;&lt;/script&gt;
    &lt;script src="src/lib/scripts/1_4_4/angular-mocks.js"&gt;&lt;/script&gt;
  
    &lt;!-- include source files here... --&gt;
    &lt;script src="src/my-template.html"&gt;&lt;/script&gt;
  
    &lt;!-- include spec files here... --&gt;
    &lt;script src="spec/tests/my-template.spec.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p><strong><em>Discard below this line</em></strong><br/>
  [I'm just going to add some gibberish below so stackoverflow won't error saying there isn't enough description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."]</p>