/* jshint es3: false, esnext: true */
/* global jasmine, beforeEach, describe, it, expect, module, inject */

(function () {

    var helpers = window._helpers = window._helpers || {};

    helpers.testModuleDependencies = function (moduleName) {

        'use strict';

        describe(moduleName + ' dependencies', function () {

            beforeEach(function () {

                module('user_management.' + moduleName);

                this.runModule = function () {
                    inject(function ($rootScope, $route) {
                        this.$rootScope = $rootScope;
                        this.$route = $route;
                    });
                };

            });

            it('should load the module without error', function () {
                expect(function () {
                    this.runModule();
                }.bind(this)).not.toThrow();
            });

            it('should have routes', function () {
                this.runModule();
                expect(Object.keys(this.$route.routes)).not.toEqual([]);
            });

        });

    };

}());

/* jshint es3: false, esnext: true */
/* global jasmine, beforeEach, describe, it, expect, module, inject */

(function () {

    var helpers = window._helpers = window._helpers || {};

    helpers.testModuleDependencies = function (moduleName) {

        'use strict';

        describe(moduleName + ' dependencies', function () {

            beforeEach(function () {

                module('user_management.' + moduleName);

                this.runModule = function () {
                    inject(function ($rootScope, $route) {
                        this.$rootScope = $rootScope;
                        this.$route = $route;
                    });
                };

            });

            it('should load the module without error', function () {
                expect(function () {
                    this.runModule();
                }.bind(this)).not.toThrow();
            });

        });

    };

}());

Remove "should have routes" common spec
Remove "should have routes" common spec

Each module should test its own routes, not just if they have some.
