Controller is undefined in jasmine on correct module and controller
<p>The variable homecontroller in my spec is undefined, even though i am using a correct module and correct controller. my code is</p>

<pre><code>describe('HomeController Tests', function () {
    //var $translateProvider;
    beforeEach(module('myModule'), function ($provide, $translateProvider) {

        $provide.factory('customLoader', function ($q) {
            return function () {
                var deferred = $q.defer();
                deferred.resolve({});
                return deferred.promise;
            };
        });

        $translateProvider.useLoader('customLoader');

    });

    var homecontroller, scope;


    beforeEach(inject(function ($rootScope, $controller, $httpBackend, SessionStorageService) {
        SessionStorageService.Set("LoginResponse", { SessionID: 'h5' });
        scope = $rootScope.$new();
        homecontroller = $controller('HomeController',
             {
                 $scope: scope
             });
        $httpBackend.when('GET', 'Translations/locale-en.json?lang=en').respond(200);
    }));
</code></pre>

<p>similar to this way i wrote a spec file for another controller for this same module, but it works fine. That spec controller code is</p>

<pre><code>describe('LoginController Tests', function () {
var $translateProvider;
beforeEach(module('myModule'), function ($provide, $translateProvider) {

    $provide.factory('customLoader', function ($q) {
        return function () {
            var deferred = $q.defer();
            deferred.resolve({});
            return deferred.promise;
        };
    });

    $translateProvider.useLoader('customLoader');

});

beforeEach(inject(function ($httpBackend, $controller, SessionStorageService, $injector, $window, Route, _$translateStaticFilesLoader_, $translate, HttpRequestSoapAPI) {
    RouteMock = $injector.get("Route");

    SessionStorageService.Set("LoginResponse", {SessionID : 'h5'});
    logincontroller = $controller('LoginController',
         {
             //some services here
         });
    $httpBackend.when('GET', 'Translations/locale-en.json?lang=en').respond(200);    
})); 
</code></pre>

<p>I got this logincontroller beautifully, but i didnt get that homecontroller.</p>

<p>Note: Both controller js files available in main page, initially login page with loginController loads, from there it navigates to home page with homeController.</p>

<p>Any thoughts please</p>