diff --git a/spec/controllers/DescriptionDialogControllerSpec.js b/spec/controllers/DescriptionDialogControllerSpec.js index e132e660..59671317 100644 --- a/spec/controllers/DescriptionDialogControllerSpec.js +++ b/spec/controllers/DescriptionDialogControllerSpec.js @@ -1,12 +1,10 @@ describe('DescriptionDialogController',function() { - var module = factory('controllers/DescriptionDialogController',{ - // 'services/log': logMock, - }); - + var module; var $scope, controller, handshakeMock; beforeEach(function() { + module = factory('controllers/DescriptionDialogController'); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q) { $scope = $rootScope.$new(); diff --git a/spec/controllers/ExportRankingDialiogControllerSpec.js b/spec/controllers/ExportRankingDialiogControllerSpec.js index 8a146949..04d6c6b6 100644 --- a/spec/controllers/ExportRankingDialiogControllerSpec.js +++ b/spec/controllers/ExportRankingDialiogControllerSpec.js @@ -1,15 +1,16 @@ describe('ExportRankingDialogController',function() { - var module = factory('controllers/ExportRankingDialogController',{ - 'services/log': logMock, - }); - + var module; var $scope, $timeout, stagesMock, scoresMock, handshakeMock; var fakeScoreboard = { "1": [1,2,3,4] }; beforeEach(function() { + module = factory('controllers/ExportRankingDialogController',{ + 'services/log': logMock, + 'services/fs': {}, + }); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q,_$timeout_) { $scope = $rootScope.$new(); diff --git a/spec/controllers/NewStageDialogControllerSpec.js b/spec/controllers/NewStageDialogControllerSpec.js index 06ea0f67..2ae831ee 100644 --- a/spec/controllers/NewStageDialogControllerSpec.js +++ b/spec/controllers/NewStageDialogControllerSpec.js @@ -1,12 +1,12 @@ describe('NewStageDialogController',function() { - var module = factory('controllers/NewStageDialogController',{ - 'services/log': logMock, - }); - + var module; var $scope, controller, handshakeMock; beforeEach(function() { + module = factory('controllers/NewStageDialogController',{ + 'services/log': logMock, + }); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q) { $scope = $rootScope.$new(); diff --git a/spec/controllers/RoundDialogControllerSpec.js b/spec/controllers/RoundDialogControllerSpec.js index faf9f70f..193cab6f 100644 --- a/spec/controllers/RoundDialogControllerSpec.js +++ b/spec/controllers/RoundDialogControllerSpec.js @@ -1,12 +1,12 @@ describe('RoundDialogController',function() { - var module = factory('controllers/RoundDialogController',{ - 'services/log': logMock, - }); - + var module; var $scope, controller, handshakeMock; beforeEach(function() { + module = factory('controllers/RoundDialogController',{ + 'services/log': logMock, + }); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q) { $scope = $rootScope.$new(); diff --git a/spec/controllers/TeamDialogControllerSpec.js b/spec/controllers/TeamDialogControllerSpec.js index f1c70282..97f6579d 100644 --- a/spec/controllers/TeamDialogControllerSpec.js +++ b/spec/controllers/TeamDialogControllerSpec.js @@ -1,12 +1,13 @@ describe('TeamDialogController',function() { - var module = factory('controllers/TeamDialogController',{ - 'services/log': logMock, - }); - + var module; var $scope, controller, settingsMock, handshakeMock; beforeEach(function() { + module = factory('controllers/TeamDialogController',{ + 'services/log': logMock, + 'services/fs': {}, + }); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q) { $scope = $rootScope.$new(); diff --git a/spec/controllers/TeamImportDialogControllerSpec.js b/spec/controllers/TeamImportDialogControllerSpec.js index 4806f9ec..d97aa9f9 100644 --- a/spec/controllers/TeamImportDialogControllerSpec.js +++ b/spec/controllers/TeamImportDialogControllerSpec.js @@ -1,12 +1,12 @@ describe('TeamImportDialogController',function() { - var module = factory('controllers/TeamImportDialogController',{ - 'services/log': logMock, - }); - + var module; var $scope, controller, handshakeMock; beforeEach(function() { + module = factory('controllers/TeamImportDialogController',{ + 'services/log': logMock, + }); angular.mock.module(module.name); angular.mock.inject(function($controller,$rootScope,$q) { $scope = $rootScope.$new(); diff --git a/spec/directives/reallySpec.js b/spec/directives/reallySpec.js index 68c617b1..b7d30798 100644 --- a/spec/directives/reallySpec.js +++ b/spec/directives/reallySpec.js @@ -1,7 +1,8 @@ describe('really',function() { - var ngDirectives = factory('directives/ng-directives'); - var module = factory('directives/really',{ - 'directives/ng-directives': ngDirectives + var module; + + beforeEach(function() { + module = factory('directives/really'); }); var $compile,$rootScope,windowMock = { diff --git a/spec/directives/sigpadSpec.js b/spec/directives/sigpadSpec.js index c9e0dcbb..793998f3 100644 --- a/spec/directives/sigpadSpec.js +++ b/spec/directives/sigpadSpec.js @@ -1,15 +1,13 @@ describe('sigpad',function() { - var ngDirectives = factory('directives/ng-directives'); - var module = factory('directives/sigpad',{ - 'directives/ng-directives': ngDirectives - }); - - + var module; var $compile,$rootScope, regenerateSpy, drawEnd; beforeEach(function() { + module = factory('directives/sigpad',{ + 'signaturepad': {}, + }); angular.mock.module(module.name); inject(function(_$compile_,_$rootScope_) { $compile = _$compile_; diff --git a/spec/directives/sizeSpec.js b/spec/directives/sizeSpec.js index c2391293..38a3a347 100644 --- a/spec/directives/sizeSpec.js +++ b/spec/directives/sizeSpec.js @@ -1,12 +1,9 @@ describe('size',function() { - var ngDirectives = factory('directives/ng-directives'); - var module = factory('directives/size',{ - 'directives/ng-directives': ngDirectives - }); - + var module; var $compile,$rootScope; beforeEach(function() { + module = factory('directives/size'); angular.mock.module(module.name); inject(function(_$compile_,_$rootScope_) { $compile = _$compile_; diff --git a/spec/directives/spinnerSpec.js b/spec/directives/spinnerSpec.js index 4b3f418c..6469f8e4 100644 --- a/spec/directives/spinnerSpec.js +++ b/spec/directives/spinnerSpec.js @@ -1,12 +1,9 @@ xdescribe('spinner',function() { - var ngDirectives = factory('directives/ng-directives'); - var module = factory('directives/spinner',{ - 'directives/ng-directives': ngDirectives - }); - + var module; var $compile, $scope, $timeout, element, container, frame, prev, next; beforeEach(function() { + module = factory('directives/spinner'); //add some styling to make it work var style = angular.element(multiline(function() {/*