From c30464c3a5216169026c23a6fea23d273bd0b948 Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Fri, 30 Aug 2013 08:25:04 -0700 Subject: [PATCH] fix(test): update tests to match service files Change service name in test to use classify instead of camelize Closes #338 Closes #354 --- templates/coffeescript-min/spec/service.coffee | 12 ++++++------ templates/coffeescript/spec/service.coffee | 12 ++++++------ templates/javascript-min/spec/service.js | 12 ++++++------ templates/javascript/spec/service.js | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/templates/coffeescript-min/spec/service.coffee b/templates/coffeescript-min/spec/service.coffee index 2610aeb..17bce6b 100644 --- a/templates/coffeescript-min/spec/service.coffee +++ b/templates/coffeescript-min/spec/service.coffee @@ -1,14 +1,14 @@ 'use strict' -describe 'Service: <%= _.camelize(name) %>', () -> +describe 'Service: <%= _.classify(name) %>', () -> # load the service's module - beforeEach module '<%= _.camelize(appname) %>App' + beforeEach module '<%= _.classify(appname) %>App' # instantiate service - <%= _.camelize(name) %> = {} - beforeEach inject (_<%= _.camelize(name) %>_) -> - <%= _.camelize(name) %> = _<%= _.camelize(name) %>_ + <%= _.classify(name) %> = {} + beforeEach inject (_<%= _.classify(name) %>_) -> + <%= _.classify(name) %> = _<%= _.classify(name) %>_ it 'should do something', () -> - expect(!!<%= _.camelize(name) %>).toBe true + expect(!!<%= _.classify(name) %>).toBe true diff --git a/templates/coffeescript/spec/service.coffee b/templates/coffeescript/spec/service.coffee index 2610aeb..17bce6b 100644 --- a/templates/coffeescript/spec/service.coffee +++ b/templates/coffeescript/spec/service.coffee @@ -1,14 +1,14 @@ 'use strict' -describe 'Service: <%= _.camelize(name) %>', () -> +describe 'Service: <%= _.classify(name) %>', () -> # load the service's module - beforeEach module '<%= _.camelize(appname) %>App' + beforeEach module '<%= _.classify(appname) %>App' # instantiate service - <%= _.camelize(name) %> = {} - beforeEach inject (_<%= _.camelize(name) %>_) -> - <%= _.camelize(name) %> = _<%= _.camelize(name) %>_ + <%= _.classify(name) %> = {} + beforeEach inject (_<%= _.classify(name) %>_) -> + <%= _.classify(name) %> = _<%= _.classify(name) %>_ it 'should do something', () -> - expect(!!<%= _.camelize(name) %>).toBe true + expect(!!<%= _.classify(name) %>).toBe true diff --git a/templates/javascript-min/spec/service.js b/templates/javascript-min/spec/service.js index 32ccb2d..2634f1b 100644 --- a/templates/javascript-min/spec/service.js +++ b/templates/javascript-min/spec/service.js @@ -1,18 +1,18 @@ 'use strict'; -describe('Service: <%= _.camelize(name) %>', function () { +describe('Service: <%= _.classify(name) %>', function () { // load the service's module - beforeEach(module('<%= _.camelize(appname) %>App')); + beforeEach(module('<%= _.classify(appname) %>App')); // instantiate service - var <%= _.camelize(name) %>; - beforeEach(inject(function(_<%= _.camelize(name) %>_) { - <%= _.camelize(name) %> = _<%= _.camelize(name) %>_; + var <%= _.classify(name) %>; + beforeEach(inject(function(_<%= _.classify(name) %>_) { + <%= _.classify(name) %> = _<%= _.classify(name) %>_; })); it('should do something', function () { - expect(!!<%= _.camelize(name) %>).toBe(true); + expect(!!<%= _.classify(name) %>).toBe(true); }); }); diff --git a/templates/javascript/spec/service.js b/templates/javascript/spec/service.js index d23867d..e3c6c83 100644 --- a/templates/javascript/spec/service.js +++ b/templates/javascript/spec/service.js @@ -1,18 +1,18 @@ 'use strict'; -describe('Service: <%= _.camelize(name) %>', function () { +describe('Service: <%= _.classify(name) %>', function () { // load the service's module - beforeEach(module('<%= _.camelize(appname) %>App')); + beforeEach(module('<%= _.classify(appname) %>App')); // instantiate service - var <%= _.camelize(name) %>; - beforeEach(inject(function (_<%= _.camelize(name) %>_) { - <%= _.camelize(name) %> = _<%= _.camelize(name) %>_; + var <%= _.classify(name) %>; + beforeEach(inject(function (_<%= _.classify(name) %>_) { + <%= _.classify(name) %> = _<%= _.classify(name) %>_; })); it('should do something', function () { - expect(!!<%= _.camelize(name) %>).toBe(true); + expect(!!<%= _.classify(name) %>).toBe(true); }); });