title: Jasmine/Karma not finding Angular modules
body: <p>I'm trying unit testing with Jasmine and Karma, but for some reason my Angular modules cannot be found. I've modified code from examples:</p>
  
  <p>karma.config.js:</p>
  
  <pre><code>files: [
    'lib/angular.js',
    'lib/angular-mocks.js',
    'js/app.js',
    'js/controllers.js',
    'js/factories.js',
    'tests/**/*.js'
  ]
  </code></pre>
  
  <p>app.js:</p>
  
  <pre><code>var app = angular.module('app', ['ngRoute']);
  app.config(function ($routeProvider) {
    $routeProvider
      .when('/test', {
        templateUrl: 'views/test.html',
        controller: 'TestCtrl'
      })
      .otherwise({redirectTo: '/'});
  });
  </code></pre>
  
  <p>controllers.js:</p>
  
  <pre><code>app.controller('TestCtrl', function ($scope, $location) {
      console.log('Test Controller');
      $scope.isActive = function(route) {
          return route === $location.path();
      };
  });
  </code></pre>
  
  <p>test-spec.js:</p>
  
  <pre><code>describe('TestCtrl testing', function () {
      var scope, $location, createController;
  
      beforeEach(inject(function ($rootScope, $controller, _$location_) {
          $location = _$location_;
          scope = $rootScope.$new();
  
          createController = function () {
              return $controller('TestCtrl', {
                  '$scope': scope
              });
          };
      })); 
  
      it('should...', function () {
          var controller = createController();
          $location.path('/test');
          expect($location.path()).toBe('/test');
          expect(scope.isActive('/test')).toBe(true);
          expect(scope.isActive('/contact')).toBe(false);
      });
  });
  </code></pre>
  
  <p>error message:
  <strong>Error: [ng:areq] Argument 'TestCtrl' is not a function, got undefined</strong></p>
  
  <p>I also tried with: <strong>beforeEach(module('TestCtrl'))</strong>, but it did not help.</p>
  
  <p>What have I missed?</p>