title: AngularJS Jasmine Test Fails: Failed to instantiate module
body: <p>My angular app worked great and so did my tests, using karma and jasmine, until I added a dependency in <code>ui.bootstrap</code>. Now the app still works as expected, but I can't get my tests to run. This is what I have:</p>
  
  <p><strong>app.js</strong> - added dependency in <strong>ui.bootstrap</strong></p>
  
  <pre><code>angular.module('myApp', ['ngResource', 'ngRoute', 'ui.bootstrap']).config(function(...) {...});
  </code></pre>
  
  <p><strong>service.js</strong></p>
  
  <pre><code>angular.module('myApp').service('myService', function () {})
  </code></pre>
  
  <p><strong>controller.js</strong></p>
  
  <pre><code>angular.module('myApp').controller('MyController', function ($scope, $http, myService) {})
  </code></pre>
  
  <p><strong>tests/main.js</strong></p>
  
  <pre><code>describe('Controller: MyController', function () {
      var MyController, scope;
      // load the controller's module
      beforeEach(function(){
          module('myApp');
          inject(function ($controller, $rootScope) {
              scope = $rootScope.$new();
              MyController = $controller('MyController', {
                  $scope:scope
              });
          });
      });
      it('should do something', function () {
          expect(scope.myOptions.length).toBe(5);
      });
  }); 
  </code></pre>
  
  <p>And my test, which I run using grunt and krama, fails due to:</p>
  
  <pre><code>Error: [$injector:modulerr] Failed to instantiate module myApp due to:
  Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
  Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled the module name or forgot
  </code></pre>
  
  <p>What have I missed? The app runs with no problem, only the test fails.</p>