title: Scope Variable in Unit Tests
body: <p>I am unit testing with karma/jasmine and am having errors with unit testing my controller. 
  Controller code: </p>
  
  <pre><code>angular.module('app.controllers', [])
      .controller('myctrl1',[function($scope){
          $scope.test = "this worked";
      }])
  </code></pre>
  
  <p>Unit Test Code:</p>
  
  <pre><code>describe('Controllers', function(){ //describe your object type
      beforeEach(module('app.controllers')); //load module&lt;br /&gt;
      describe('Running Test for :',function(){ //describe your app name&lt;br /&gt;
          var myctrl;
          beforeEach(inject(function($controller){ //instantiate controller using $controller service
              myctrl = $controller('myctrl1');
          }));
          it('Test scope var', function(){  //write tests
              expect($scope.test).toBe('this worked'); //pass
          });
      });
  });
  </code></pre>
  
  <p>I am getting the following error: </p>
  
  <pre><code>TypeError: Cannot set property 'test' of undefined
  ReferenceError: $scope is not defined
  </code></pre>