diff --git a/blueprints/initializer/files/__root__/initializers/__name__.js b/blueprints/initializer/files/__root__/initializers/__name__.js index f47caae..2f93401 100644 --- a/blueprints/initializer/files/__root__/initializers/__name__.js +++ b/blueprints/initializer/files/__root__/initializers/__name__.js @@ -2,7 +2,4 @@ export function initialize(/* application */) { // application.inject('route', 'foo', 'service:foo'); } -export default { - name: '<%= dasherizedModuleName %>', - initialize -}; +export default { initialize }; diff --git a/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js b/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js index 4b96d1b..f0f9f38 100644 --- a/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +++ b/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js @@ -2,7 +2,4 @@ export function initialize(/* appInstance */) { // appInstance.inject('route', 'foo', 'service:foo'); } -export default { - name: '<%= dasherizedModuleName %>', - initialize -}; +export default { initialize }; diff --git a/node-tests/blueprints/initializer-test.js b/node-tests/blueprints/initializer-test.js index c724aee..7930730 100644 --- a/node-tests/blueprints/initializer-test.js +++ b/node-tests/blueprints/initializer-test.js @@ -23,10 +23,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('tests/unit/initializers/foo-test.js')) .to.contain("import { initialize } from 'my-app/initializers/foo';"); @@ -43,10 +40,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('tests/unit/initializers/foo/bar-test.js')) .to.contain("import { initialize } from 'my-app/initializers/foo/bar';"); @@ -63,10 +57,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/initializers/foo.js')) .to.contain("export { default, initialize } from 'my-addon/initializers/foo';"); @@ -86,10 +77,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/initializers/foo/bar.js')) .to.contain("export { default, initialize } from 'my-addon/initializers/foo/bar';"); @@ -109,10 +97,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/initializers/foo.js')) .to.not.exist; @@ -132,10 +117,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/initializers/foo/bar.js')) .to.not.exist; @@ -155,10 +137,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('lib/my-addon/app/initializers/foo.js')) .to.contain("export { default, initialize } from 'my-addon/initializers/foo';"); @@ -178,10 +157,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('lib/my-addon/app/initializers/foo/bar.js')) .to.contain("export { default, initialize } from 'my-addon/initializers/foo/bar';"); @@ -203,10 +179,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -221,10 +194,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -238,10 +208,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -257,10 +224,7 @@ describe('Acceptance: ember generate and destroy initializer', function() { " // application.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); diff --git a/node-tests/blueprints/instance-initializer-test.js b/node-tests/blueprints/instance-initializer-test.js index 4b0cd9c..4bb89df 100644 --- a/node-tests/blueprints/instance-initializer-test.js +++ b/node-tests/blueprints/instance-initializer-test.js @@ -23,10 +23,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('tests/unit/instance-initializers/foo-test.js')) .to.contain("import { initialize } from 'my-app/instance-initializers/foo';"); @@ -43,10 +40,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('tests/unit/instance-initializers/foo/bar-test.js')) .to.contain("import { initialize } from 'my-app/instance-initializers/foo/bar';"); @@ -63,10 +57,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/instance-initializers/foo.js')) .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';"); @@ -85,10 +76,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/instance-initializers/foo/bar.js')) .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo/bar';"); @@ -107,10 +95,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/instance-initializers/foo.js')) .to.not.exist; @@ -130,10 +115,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('app/instance-initializers/foo/bar.js')) .to.not.exist; @@ -153,10 +135,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('lib/my-addon/app/instance-initializers/foo.js')) .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo';"); @@ -175,10 +154,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); expect(_file('lib/my-addon/app/instance-initializers/foo/bar.js')) .to.contain("export { default, initialize } from 'my-addon/instance-initializers/foo/bar';"); @@ -197,10 +173,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -215,10 +188,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -232,10 +202,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); }); @@ -251,10 +218,7 @@ describe('Acceptance: ember generate and destroy instance-initializer', function " // appInstance.inject('route', 'foo', 'service:foo');\n" + "}\n" + "\n" + - "export default {\n" + - " name: 'foo/bar',\n" + - " initialize\n" + - "};"); + "export default { initialize };"); })); });