Skip to content

Commit

Permalink
The initializer API has changed as of 2.X, the blueprints need to be …
Browse files Browse the repository at this point in the history
…updated to address those changes. See also: emberjs/ember.js#10179
  • Loading branch information
nathanhammond committed Oct 2, 2015
1 parent 796dbac commit 4df6d55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Ember from 'ember';
import { initialize } from '<%= dependencyDepth %>/initializers/<%= dasherizedModuleName %>';
import <%= classifiedModuleName %>Initializer from '<%= dependencyDepth %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';

var application;
Expand All @@ -15,7 +15,7 @@ module('<%= friendlyTestName %>', {

// Replace this with your real tests.
test('it works', function(assert) {
initialize(application);
<%= classifiedModuleName %>Initializer.initialize(application);

// you would normally confirm the results of the initializer here
assert.ok(true);
Expand Down
8 changes: 4 additions & 4 deletions tests/acceptance/generate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ describe('Acceptance: ember generate', function() {
});

assertFile('tests/unit/initializers/foo-test.js', {
contains: "import { initialize } from '../../../initializers/foo';"
contains: "import FooInitializer from '../../../initializers/foo';"
});
});
});
Expand All @@ -544,10 +544,10 @@ describe('Acceptance: ember generate', function() {
return generate(['initializer-test', 'foo']).then(function() {
assertFile('tests/unit/initializers/foo-test.js', {
contains: [
"import { initialize } from '../../../initializers/foo';",
"import FooInitializer from '../../../initializers/foo';",
"module('Unit | Initializer | foo'",
"var application;",
"initialize(application);"
"FooInitializer.initialize(application);"
]
});
});
Expand All @@ -567,7 +567,7 @@ describe('Acceptance: ember generate', function() {
});

assertFile('tests/unit/initializers/foo/bar-test.js', {
contains: "import { initialize } from '../../../../initializers/foo/bar';"
contains: "import FooBarInitializer from '../../../../initializers/foo/bar';"
});
});
});
Expand Down

0 comments on commit 4df6d55

Please sign in to comment.