title: Mock Angular JS Controller Jasmine
body: <p>I am new to angular js.. just built an sample controller.. and now want to unit test it.. not sure how to write mock it in jasmine.. </p>
  
  <p><strong>TestApp.js</strong></p>
  
  <pre><code>var TestApp = angular.module('TestApp');  
  TestApp.controller('TestCtrl', function($scope) {
      $scope.test = "test";
      });
  })();
  </code></pre>
  
  <p><strong>TestApp_Spec.js</strong></p>
  
  <pre><code>var scope, ctrl;
  
  //you need to inject dependencies first
  beforeEach(inject(function($rootScope) {
      $scope = $rootScope.$new();        
  }));
  
  it('test value should be test', inject(function($controller) {
      ctrl = $controller('TestCtrl', {
          scope: $scope
      });
      expect(scope.test).toBe("test");
  }));
  </code></pre>
  
  <p>I am using stand alone version of jasmine and included angular.min.js, angular.mocks.js,TestApp.js and TestApp_Spec.js in the sepc_runner.html</p>
  
  <p>Test results are not showing up.. </p>
  
  <p>Need help in writing the correct test cases..</p>