title: Injecting custom factory in jasmine test
body: <p>I tried to inject a factory to my controller in jasmine test like in
  <a href="https://stackoverflow.com/questions/16565531/angularjs-unit-testing-a-factory-that-has-dependencies">Unit testing AngularJS factories that have dependencies</a></p>
  
  <p>When I $provide a factory in the test, I would expect the controller to use the provided factory. But the console.log still prints 'real value'. I don't get it.</p>
  
  <pre><code>var app = angular.module('mod', []);
  
  app.factory('factoryA', [
      function () {
          return "real value";
      }
  ]);
  
  app.controller('myController', ['factoryA',
      function (factoryA) {
          console.log(factoryA);
      }
  ]);
  
  
  describe("test", function() {
      var $scope, $controller, $httpBackend;
      var app;
  
      beforeEach(function() {
          module(function($provide) {
              $provide.factory('factoryA', function () { return "fake value"; });
          });
          app = module("mod");
  
          inject(function (_$controller_, _$httpBackend_, $rootScope) {
              $httpBackend = _$httpBackend_;
              $scope = $rootScope.$new();
              $controller = _$controller_;
          });
  
      });
  
      it("works", function() {
          $controller("myController", { '$scope': $scope });
      });
  
  });
  </code></pre>