title: undefined controller in jasmine unit test
body: <p>I am using karma via gulp-karma but getting the following error:</p>
  
  <blockquote>
    <p>Error: [ng:areq] Argument 'adminPagesCtrl' is not a function, got
    undefined</p>
  </blockquote>
  
  <p>Here is my spec file:</p>
  
  <pre><code>describe('adminPagesCtrl', function() {
      var $rootScope,
          controller;
  
      beforeEach(function() {
          angular.module('jhApp')
          .config(['$locationProvider',
              function($locationProvider) {
                  $locationProvider.html5Mode(true);
          }]); 
      });
  
      beforeEach(inject(function ($rootScope, $controller) {
          scope = $rootScope.$new();
          controller = $controller;
          controller('adminPagesCtrl', {$scope: scope});
      }));
  
      it('does a thing', function() {
          expect(true).toBe(true);
      });
  });
  </code></pre>
  
  <p>I have checked the browser window that karma opens up and can see all the files loaded. Application is working fine. Not sure what else to try?</p>