title: Jasmine test to test if the controller is defined
body: <p>New to Jasmine tests for angular. I am trying to test if the controller I defined is defined or not to begin with but I am getting error saying <code>Expected undefined to be defined.</code> 
  Here is my main code:</p>
  
  <pre><code>// controller logic MatchController.js
  (function () {
  'use strict';
  
  angular.module('app.match')
          .controller('MatchController', MatchController);
  
  
  MatchController.$inject = ['APP_CONFIG', '$authUser', '$http', '$rootScope', '$state', '$stateParams', 'SearchService', 'ConfirmMatchService', 'MusicOpsService', 'ContentOpsService', 'MatchstickService', 'MatchService', 'Restangular'];
  function MatchController(APP_CONFIG, $authUser, $http, $rootScope, $state, $stateParams, searchService, confirmMatchService, musicOpsService, contentOpsService, matchstickService, matchService, Restangular) {
  
      var vm = this;
   .
   .
   .
     }
  })();
  </code></pre>
  
  <p>Here is the test file</p>
  
  <pre><code>// MatchController.spec.js
  (function(){
  'use strict';
  describe('Match Controller Tests', function(){
  
      var module, MatchTestController;
  
      beforeEach(function() {
          module = angular.module('app.match');
      });
  
      beforeEach(inject(function ($controller) {
  
          MatchTestController = $controller('MatchController', {});
      }));
  
      describe("Match controller to be defined", function() {
  
          it("should be created successfully", function () {
              expect(MatchTestController).toBeDefined();
          });
      });
  
  });
  
  })();
  </code></pre>
  
  <p>I keep getting the error:</p>
  
  <pre><code>TypeError: 'undefined' is not a function (evaluating 'angular.controller('MatchController')')
  undefined
      at /Users/rgoti/match-ui/match-ui/public/src/app/match/match.controller.spec.js:16
      at invoke (/Users/rgoti/match-ui/match-ui/public/bower_components/angular/angular.js:4219)
      at workFn (/Users/rgoti/match-ui/match-ui/public/bower_components/angular-mocks/angular-mocks.js:2475)
  Expected undefined to be defined.
      at /Users/rgoti/match-ui/match-ui/public/src/app/match/match.controller.spec.js:22
  </code></pre>
  
  <p>Not sure what I am doing wrong here. </p>