title: Two controller test suites, one giving " Error: [ng:areq] Argument 'modalController' is not a function, got undefined"
body: <p>Controller test suite one (main controller):</p>
  
  <pre><code>describe("RTL cache viewing utility main controller test suite", function () {
  
  var $rootScope, mainCtrl;
  
  
  beforeEach(module('app'));
  beforeEach(inject(function ($controller, $rootScope, $compile, $q) {
      mainScope = $rootScope.$new();
      ctrl = $controller('mainCtrl', {
          $scope: mainScope
      });
  }));
  </code></pre>
  
  <p>followed by another describe and <code>it</code>s.  This one works fine.</p>
  
  <p>Second test suite, for my modal controller:</p>
  
  <pre><code>describe("RTL cache viewing utility modal controller test suite", function () {
  
  var $rootScope, modalController;
  
  beforeEach(module('app'));
  beforeEach(inject(function ($controller, $rootScope, $compile) {
      mainScope = $rootScope.$new();
      ctrl = $controller('modalController', {
          $scope: mainScope
      });
  
  }));
  </code></pre>
  
  <p>followed by another describe and one <code>it</code>.</p>
  
  <p>Second controller throws this error: <code>Error: [ng:areq] Argument 'modalController' is not a function, got undefined</code></p>
  
  <p>Declarations for main controller :</p>
  
  <pre><code>var app = angular.module("app", ["agGrid", "ui.bootstrap"]);
  angular.module("app").controller("mainCtrl", ["$scope", "$timeout", "dateFilter", "$http", "shareDataService", "getDataService", "$q", function ($scope, $timeout, dateFilter, $http, shareDataService, getDataService, $q) {
  
  //stuff
  }]);
  </code></pre>
  
  <p>modal controller : </p>
  
  <pre><code>angular.module("app").controller("modalCtrl", ["$scope",     "shareDataService", "getDataService", function ($scope, shareDataService,     ngDialog, getDataService) {
  //stuff
  }]);
  </code></pre>