title: Jasmine unit test failing with resolve values in controller
body: <p>Before i started, i have followed the advice found here without any success: <a href="https://stackoverflow.com/questions/15322155/how-can-i-test-a-controller-with-resolve-properties-in-angularjs">How can I test a controller with resolve properties in AngularJS?</a></p>
  
  <p>Im my app.js, i have a simple resolve:</p>
  
  <pre><code>var app = angular.module('myApp', ['ui.router']);
  
  app.config(function($stateProvider, $urlRouterProvider) {
  
  $stateProvider
  
      .state('index', {
          url: '/index',
          templateUrl: 'html/home.html',
          controller: 'HomeController',
          resolve: {
              homeInfo:  function() {
                  return {
                      subtitle : 'Welcome to tables, ladders and chairs'
                  };
              }
          }
      })
  </code></pre>
  
  <p>And in my HomeController.js:</p>
  
  <pre><code>app.controller('HomeController', function($scope, srv1, srv2, homeInfo, $rootScope) {
  
      $rootScope.$broadcast('brdSubtitle', homeInfo.subtitle);
  
  });
  </code></pre>
  
  <p>My test:</p>
  
  <pre><code>describe('HomeController', function () {
  
      var $rootScope, $scope, $controller, homeController;
  
      beforeEach(module('myApp'));
  
      beforeEach(inject(function (_$rootScope_, _$controller_) {
          $rootScope = _$rootScope_;
          $scope = $rootScope.$new();
          $controller = _$controller_;
  
          homeController = $controller('HomeController', {'$rootScope': $rootScope, '$scope': $scope, homeInfo: { subtitle : 'Welcome to tables, ladders and chairs' }});
      }));
  
      it('should exist', function() {
          expect(homeController).toBeDefined();
      });
  
      it('should have a subtitle', function() {
          expect(homeController.homeInfo.subtitle.text()).toBe('Welcome to tables, ladders and chairs');
      });
  });
  </code></pre>
  
  <p>Error is:</p>
  
  <pre><code>TypeError: homeController.homeInfo is undefined in /path/to/specs.js
  </code></pre>