title: In Karma Testing, ReferenceError: describe is not defined
body: <p>I was about to do unit test in my project.
  What I wrote was just a simple test code.
  However, there came out weird message :
  ReferenceError : describe is not defined.</p>
  
  <p>How can I get over this ?</p>
  
  <p>This is my code :</p>
  
  <pre><code>'use strict';
  
  (function() {
      //Cal test Controller Spec
      describe('Cal test Controller Tests',function(){
          //Initialize global variables
          var CalTestController,
              scope;
  
          //Then we can start by loading the main application module
          beforeEach(module(ApplicationConfiguration.applicationModuleName));
  
          //The injector ignores leading and trailing underscores here(i.e._$httpBackend_).
          //This allows us to inject a service but then attach to it to a variable.
          //with the same name as the service.
          beforeEach(inject(function($controller,$rootScope){
              //Set a new global scope
              scope=$rootScope.$new();
  
              //Initialize the Cal test controller.
              CalTestController = $controller('CalController',{
                  $scope:scope
              });
          }));
          var a;
          it('contains spec with an expectation',inject(function(){
              a = true;
              expect(a).toBe(true);
          }));
      });
      describe("The 'toBe' matcher compares with===",function(){
          it("and has a positive case",function(){
              expect(true).toBe(true);
          });
          it("and can have a negative case",function(){
              expect(false).not.toBe(true);
          });
      });
  }());
  </code></pre>