From 0f89383d981d0144c6db92b163edcc545d6b5222 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 9 Apr 2012 11:20:55 -0700 Subject: [PATCH] chore(tests): rename all directive names to the normalized form --- test/AngularSpec.js | 6 +++--- test/ng/compilerSpec.js | 2 +- test/ng/directive/booleanAttrsSpec.js | 4 ++-- test/ng/directive/formSpec.js | 2 +- test/ng/directive/inputSpec.js | 20 ++++++++++---------- test/ng/directive/ngBindSpec.js | 12 ++++++------ test/ng/directive/ngClassSpec.js | 8 ++++---- test/ng/directive/ngClickSpec.js | 2 +- test/ng/directive/ngCloakSpec.js | 6 +++--- test/ng/directive/ngControllerSpec.js | 2 +- test/ng/directive/ngEventDirsSpec.js | 2 +- test/ng/directive/ngIncludeSpec.js | 2 +- test/ng/directive/ngInitSpec.js | 4 ++-- test/ng/directive/ngNonBindableSpec.js | 2 +- test/ng/directive/ngPluralizeSpec.js | 2 +- test/ng/directive/ngRepeatSpec.js | 12 ++++++------ test/ng/directive/ngShowHideSpec.js | 6 +++--- test/ng/directive/ngStyleSpec.js | 2 +- test/ng/directive/ngSwitchSpec.js | 2 +- test/ng/directive/ngViewSpec.js | 4 ++-- test/ng/directive/selectSpec.js | 12 ++++++------ test/ng/locationSpec.js | 2 +- 22 files changed, 58 insertions(+), 58 deletions(-) diff --git a/test/AngularSpec.js b/test/AngularSpec.js index cf34305a..70f41d33 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -345,7 +345,7 @@ describe('angular', function() { }); - it('should look for ng-app directive in id', function() { + it('should look for ngApp directive in id', function() { var appElement = jqLite('
')[0]; jqLite(document.body).append(appElement); angularInit(element, bootstrap); @@ -353,7 +353,7 @@ describe('angular', function() { }); - it('should look for ng-app directive in className', function() { + it('should look for ngApp directive in className', function() { var appElement = jqLite('
')[0]; element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; } element.querySelectorAll['.ng\\:app'] = [appElement]; @@ -362,7 +362,7 @@ describe('angular', function() { }); - it('should look for ng-app directive using querySelectorAll', function() { + it('should look for ngApp directive using querySelectorAll', function() { var appElement = jqLite('
')[0]; element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; } element.querySelectorAll['[ng\\:app]'] = [ appElement ]; diff --git a/test/ng/compilerSpec.js b/test/ng/compilerSpec.js index f9d8d301..1aef24fe 100644 --- a/test/ng/compilerSpec.js +++ b/test/ng/compilerSpec.js @@ -470,7 +470,7 @@ describe('$compile', function() { })); - it('should merge interpolated css class with ng-repeat', + it('should merge interpolated css class with ngRepeat', inject(function($compile, $rootScope) { element = $compile( '
' + diff --git a/test/ng/directive/booleanAttrsSpec.js b/test/ng/directive/booleanAttrsSpec.js index dd96ebf5..f398441e 100644 --- a/test/ng/directive/booleanAttrsSpec.js +++ b/test/ng/directive/booleanAttrsSpec.js @@ -77,7 +77,7 @@ describe('boolean attr directives', function() { }); -describe('ng-src', function() { +describe('ngSrc', function() { it('should interpolate the expression and bind to src', inject(function($compile, $rootScope) { var element = $compile('
')($rootScope) @@ -94,7 +94,7 @@ describe('ng-src', function() { }); -describe('ng-href', function() { +describe('ngHref', function() { var element; afterEach(function() { diff --git a/test/ng/directive/formSpec.js b/test/ng/directive/formSpec.js index 3e672a7b..8b87f266 100644 --- a/test/ng/directive/formSpec.js +++ b/test/ng/directive/formSpec.js @@ -53,7 +53,7 @@ describe('form', function() { }); - it('should use ng-form as form name', function() { + it('should use ngForm value as form name', function() { doc = $compile( '
' + '' + diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js index 395f37c3..9f8b21c4 100644 --- a/test/ng/directive/inputSpec.js +++ b/test/ng/directive/inputSpec.js @@ -233,7 +233,7 @@ describe('NgModelController', function() { }); }); -describe('ng-model', function() { +describe('ngModel', function() { it('should set css classes (ng-valid, ng-invalid, ng-pristine, ng-dirty)', inject(function($compile, $rootScope, $sniffer) { @@ -376,7 +376,7 @@ describe('input', function() { }); - it('should ignore input without ng-model attr', function() { + it('should ignore input without ngModel directive', function() { compileInput(''); changeInputValueTo(''); @@ -750,7 +750,7 @@ describe('input', function() { describe('checkbox', function() { - it('should ignore checkbox without ng-model attr', function() { + it('should ignore checkbox without ngModel directive', function() { compileInput(''); changeInputValueTo(''); @@ -847,7 +847,7 @@ describe('input', function() { }); - it('should ignore textarea without ng-model attr', function() { + it('should ignore textarea without ngModel directive', function() { compileInput(''); inputElm = formElm.find('textarea'); @@ -860,7 +860,7 @@ describe('input', function() { }); - describe('ng-list', function() { + describe('ngList', function() { it('should parse text into an array', function() { compileInput(''); @@ -941,7 +941,7 @@ describe('input', function() { describe('required', function() { - it('should allow bindings on ng-required', function() { + it('should allow bindings via ngRequired', function() { compileInput(''); scope.$apply(function() { @@ -1015,7 +1015,7 @@ describe('input', function() { }); - describe('ng-change', function() { + describe('ngChange', function() { it('should $eval expression after new value is set in the model', function() { compileInput(''); @@ -1040,7 +1040,7 @@ describe('input', function() { }); - it('should $eval ng-change expression on checkbox', function() { + it('should $eval ngChange expression on checkbox', function() { compileInput(''); scope.changeFn = jasmine.createSpy('changeFn'); @@ -1053,7 +1053,7 @@ describe('input', function() { }); - describe('ng-value', function() { + describe('ngValue', function() { it('should evaluate and set constant expressions', function() { compileInput('' + @@ -1090,7 +1090,7 @@ describe('input', function() { }); - it('should work inside ng-repeat', function() { + it('should work inside ngRepeat', function() { compileInput( ''); diff --git a/test/ng/directive/ngBindSpec.js b/test/ng/directive/ngBindSpec.js index ad4d30ff..628b0092 100644 --- a/test/ng/directive/ngBindSpec.js +++ b/test/ng/directive/ngBindSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-bind-*', function() { +describe('ngBind*', function() { var element; @@ -9,7 +9,7 @@ describe('ng-bind-*', function() { }); - describe('ng-bind', function() { + describe('ngBind', function() { it('should set text', inject(function($rootScope, $compile) { element = $compile('
')($rootScope); @@ -55,9 +55,9 @@ describe('ng-bind-*', function() { }); - describe('ng-bind-template', function() { + describe('ngBindTemplate', function() { - it('should ng-bind-template', inject(function($rootScope, $compile) { + it('should ngBindTemplate', inject(function($rootScope, $compile) { element = $compile('
')($rootScope); $rootScope.name = 'Misko'; $rootScope.$digest(); @@ -74,7 +74,7 @@ describe('ng-bind-*', function() { }); - describe('ng-bind-html', function() { + describe('ngBindHtml', function() { it('should set html', inject(function($rootScope, $compile) { element = $compile('
')($rootScope); @@ -100,7 +100,7 @@ describe('ng-bind-*', function() { }); - describe('ng-bind-html-unsafe', function() { + describe('ngBindHtmlUnsafe', function() { it('should set unsafe html', inject(function($rootScope, $compile) { element = $compile('
')($rootScope); diff --git a/test/ng/directive/ngClassSpec.js b/test/ng/directive/ngClassSpec.js index 2297e343..e8685b7d 100644 --- a/test/ng/directive/ngClassSpec.js +++ b/test/ng/directive/ngClassSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-class', function() { +describe('ngClass', function() { var element; @@ -148,7 +148,7 @@ describe('ng-class', function() { })); - it('should ng-class odd/even', inject(function($rootScope, $compile) { + it('should ngClass odd/even', inject(function($rootScope, $compile) { element = $compile('
    • ')($rootScope); $rootScope.$digest(); var e1 = jqLite(element[0].childNodes[1]); @@ -160,7 +160,7 @@ describe('ng-class', function() { })); - it('should allow both ng-class and ng-class-odd/even on the same element', inject(function($rootScope, $compile) { + it('should allow both ngClass and ngClassOdd/Even on the same element', inject(function($rootScope, $compile) { element = $compile('
        ' + '
      • ' + @@ -178,7 +178,7 @@ describe('ng-class', function() { })); - it('should allow both ng-class and ng-class-odd/even with multiple classes', inject(function($rootScope, $compile) { + it('should allow both ngClass and ngClassOdd/Even with multiple classes', inject(function($rootScope, $compile) { element = $compile('
          ' + '
        • ' + diff --git a/test/ng/directive/ngClickSpec.js b/test/ng/directive/ngClickSpec.js index f5086d1c..3e997c46 100644 --- a/test/ng/directive/ngClickSpec.js +++ b/test/ng/directive/ngClickSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-click', function() { +describe('ngClick', function() { var element; afterEach(function() { diff --git a/test/ng/directive/ngCloakSpec.js b/test/ng/directive/ngCloakSpec.js index f3c28b60..db673375 100644 --- a/test/ng/directive/ngCloakSpec.js +++ b/test/ng/directive/ngCloakSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-cloak', function() { +describe('ngCloak', function() { var element; @@ -17,7 +17,7 @@ describe('ng-cloak', function() { })); - it('should remove ng-cloak class from a compiled element with attribute', inject( + it('should remove ngCloak class from a compiled element with attribute', inject( function($rootScope, $compile) { element = jqLite('
          '); @@ -33,7 +33,7 @@ describe('ng-cloak', function() { })); - it('should remove ng-cloak class from a compiled element', inject(function($rootScope, $compile) { + it('should remove ngCloak class from a compiled element', inject(function($rootScope, $compile) { element = jqLite('
          '); expect(element.hasClass('foo')).toBe(true); diff --git a/test/ng/directive/ngControllerSpec.js b/test/ng/directive/ngControllerSpec.js index 832a683d..ab85c569 100644 --- a/test/ng/directive/ngControllerSpec.js +++ b/test/ng/directive/ngControllerSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-controller', function() { +describe('ngController', function() { var element; beforeEach(inject(function($window) { diff --git a/test/ng/directive/ngEventDirsSpec.js b/test/ng/directive/ngEventDirsSpec.js index c42f9b26..4aa09fc5 100644 --- a/test/ng/directive/ngEventDirsSpec.js +++ b/test/ng/directive/ngEventDirsSpec.js @@ -9,7 +9,7 @@ describe('event directives', function() { }); - describe('ng-submit', function() { + describe('ngSubmit', function() { it('should get called on form submit', inject(function($rootScope, $compile) { element = $compile('
          ' + diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js index cf173215..7c94a70e 100644 --- a/test/ng/directive/ngIncludeSpec.js +++ b/test/ng/directive/ngIncludeSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-include', function() { +describe('ngInclude', function() { var element; diff --git a/test/ng/directive/ngInitSpec.js b/test/ng/directive/ngInitSpec.js index 92146089..00038621 100644 --- a/test/ng/directive/ngInitSpec.js +++ b/test/ng/directive/ngInitSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-init', function() { +describe('ngInit', function() { var element; @@ -9,7 +9,7 @@ describe('ng-init', function() { }); - it("should ng-init", inject(function($rootScope, $compile) { + it("should init model", inject(function($rootScope, $compile) { element = $compile('
          ')($rootScope); expect($rootScope.a).toEqual(123); })); diff --git a/test/ng/directive/ngNonBindableSpec.js b/test/ng/directive/ngNonBindableSpec.js index 1f7bf25d..ed9ea6ab 100644 --- a/test/ng/directive/ngNonBindableSpec.js +++ b/test/ng/directive/ngNonBindableSpec.js @@ -1,7 +1,7 @@ 'use strict'; -describe('ng-non-bindable', function() { +describe('ngNonBindable', function() { var element; diff --git a/test/ng/directive/ngPluralizeSpec.js b/test/ng/directive/ngPluralizeSpec.js index c7766c7b..e89adbc1 100644 --- a/test/ng/directive/ngPluralizeSpec.js +++ b/test/ng/directive/ngPluralizeSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-pluralize', function() { +describe('ngPluralize', function() { var element; diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 4195ef83..5cb7196b 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-repeat', function() { +describe('ngRepeat', function() { var element; @@ -9,7 +9,7 @@ describe('ng-repeat', function() { }); - it('should ng-repeat over array', inject(function($rootScope, $compile) { + it('should ngRepeat over array', inject(function($rootScope, $compile) { element = $compile( '
            ' + '
          • ' + @@ -37,7 +37,7 @@ describe('ng-repeat', function() { })); - it('should ng-repeat over object', inject(function($rootScope, $compile) { + it('should ngRepeat over object', inject(function($rootScope, $compile) { element = $compile( '
              ' + '
            • ' + @@ -48,7 +48,7 @@ describe('ng-repeat', function() { })); - it('should not ng-repeat over parent properties', inject(function($rootScope, $compile) { + it('should not ngRepeat over parent properties', inject(function($rootScope, $compile) { var Class = function() {}; Class.prototype.abc = function() {}; Class.prototype.value = 'abc'; @@ -64,14 +64,14 @@ describe('ng-repeat', function() { })); - it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile) { + it('should error on wrong parsing of ngRepeat', inject(function($rootScope, $compile) { expect(function() { element = $compile('
              ')($rootScope); }).toThrow("Expected ngRepeat in form of '_item_ in _collection_' but got 'i dont parse'."); })); - it("should throw error when left-hand-side of ng-repeat can't be parsed", inject( + it("should throw error when left-hand-side of ngRepeat can't be parsed", inject( function($rootScope, $compile) { expect(function() { element = $compile('
              ')($rootScope); diff --git a/test/ng/directive/ngShowHideSpec.js b/test/ng/directive/ngShowHideSpec.js index 5005274d..ee251dbf 100644 --- a/test/ng/directive/ngShowHideSpec.js +++ b/test/ng/directive/ngShowHideSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-show / ng-hide', function() { +describe('ngShow / ngHide', function() { var element; @@ -8,7 +8,7 @@ describe('ng-show / ng-hide', function() { dealoc(element); }); - describe('ng-show', function() { + describe('ngShow', function() { it('should show and hide an element', inject(function($rootScope, $compile) { element = jqLite('
              '); element = $compile(element)($rootScope); @@ -30,7 +30,7 @@ describe('ng-show / ng-hide', function() { })); }); - describe('ng-hide', function() { + describe('ngHide', function() { it('should hide an element', inject(function($rootScope, $compile) { element = jqLite('
              '); element = $compile(element)($rootScope); diff --git a/test/ng/directive/ngStyleSpec.js b/test/ng/directive/ngStyleSpec.js index c12f2f4d..89056f53 100644 --- a/test/ng/directive/ngStyleSpec.js +++ b/test/ng/directive/ngStyleSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-style', function() { +describe('ngStyle', function() { var element; diff --git a/test/ng/directive/ngSwitchSpec.js b/test/ng/directive/ngSwitchSpec.js index b4df109e..66ae5562 100644 --- a/test/ng/directive/ngSwitchSpec.js +++ b/test/ng/directive/ngSwitchSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-switch', function() { +describe('ngSwitch', function() { var element; diff --git a/test/ng/directive/ngViewSpec.js b/test/ng/directive/ngViewSpec.js index 4c0b841b..00fc6827 100644 --- a/test/ng/directive/ngViewSpec.js +++ b/test/ng/directive/ngViewSpec.js @@ -1,6 +1,6 @@ 'use strict'; -describe('ng-view', function() { +describe('ngView', function() { var element; beforeEach(module(function() { @@ -137,7 +137,7 @@ describe('ng-view', function() { }); - it('should be possible to nest ng-view in ng-include', function() { + it('should be possible to nest ngView in ngInclude', function() { module(function($routeProvider) { $routeProvider.when('/foo', {template: 'viewPartial.html'}); diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js index 9518d988..611f30c9 100644 --- a/test/ng/directive/selectSpec.js +++ b/test/ng/directive/selectSpec.js @@ -23,7 +23,7 @@ describe('select', function() { describe('select-one', function() { - it('should compile children of a select without a ng-model, but not create a model for it', + it('should compile children of a select without a ngModel, but not create a model for it', function() { compile('