title: Calling $scope methods in jasmine
body: <p>I'm extremely new to angular and jasmine, so I'm sorry if this is a basic question and I've overlooked something in the documentation and tutorials I've read.  I'm creating my first unit test for a new angular project.  I'm running into troubles calling methods and some variables.  </p>
  
  <p>I'm testing this dummy controller:</p>
  
  <pre><code>.controller( 'DummyCtrl', function DummyCtrl($scope){
      $scope.name = "TBD";
  
      $scope.changeToJackie = function(){
          $scope.name="Jackie";
      };
  
      $scope.changeToGeorge = function() {
          $scope.name="George";
      };
  })
  </code></pre>
  
  <p>Using this unit test:</p>
  
  <pre><code>describe( 'DummyCtrl', function(){
    var $scope, $controller, DummyCtrl;
  
    beforeEach(module('mApp');
    beforeEach(inject(function($injector) {
               $scope = $injector.get('$rootScope');
               $controller = $injector.get('$controller');
               DummyCtrl = $controller('DummyCtrl', {$scope: $scope});
  
    it('should start with TBD', function(){
          expect($scope.name).toEqual("TBD");
     });
  
    $scope.changeToJackie();
    it('should now say Jackie', function() {
        expect($scope.name).toEqual("Jackie");
     });
  
    $scope.changeToGeorge();
    it ('should now say George', function() {
        expect($scope.name).toEqual("George");
    });
  });
  </code></pre>
  
  <p>I'm getting a ton more errors in this more basic version I created to figure out my actual unit tests (specifically calling a $scope.method("param") that calls an $http.PUT.  My errors look more like :</p>
  
  <pre><code>Chrome 27.0 (Mac) unauth controllers DummyCtrl should start with TBD FAILED
  Error: Argument 'DummyCtrl' is not a function, got undefined
      at assertArg (/&lt;path&gt;/build/angular/angular.js:975:11)
      at assertArgFn (/&lt;path&gt;/build/angular/angular.js:985:3)
      at /&lt;path&gt;/build/angular/angular.js:4656:9
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:20:16)
      at Object.invoke (/&lt;path&gt;/build/angular/angular.js:2820:28)
      at workFn (/o&lt;path&gt;/build/angular/angular-mocks.js:1780:20)
  Error: Declaration Location
      at window.inject.angular.mock.inject (/&lt;path&gt;/build/angular/angular-mocks.js:1766:25)
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:10:14)
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:9:2)
      at /o&lt;path&gt;/src/app/unauth/unauth.spec.js:1:1
  Expected undefined to equal 'TBD'.
  Error: Expected undefined to equal 'TBD'.
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:25:25)
  Chrome 27.0 (Mac) unauth controllers DummyCtrl encountered a declaration exception FAILED
  TypeError: Cannot read property 'stack' of null
      at workFn (/&lt;path&gt;/build/angular/angular-mocks.js:1782:55)
  TypeError: Cannot call method 'changeToJackie' of undefined
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:28:11)
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:23:3)
      at null.&lt;anonymous&gt; (/&lt;path&gt;/src/app/unauth/unauth.spec.js:9:2)
  </code></pre>
  
  <p>Please excuse my nativity in angular/jasmine/javascript.  Any help will be grateful, even if it's just a link to a better tutorial. </p>