Skip to content

Commit

Permalink
Merge pull request #2 from marcoow/fix-normalization
Browse files Browse the repository at this point in the history
Make sure container and resolver normalize the same way
  • Loading branch information
dgeb committed Nov 1, 2014
2 parents d515f3b + 4a5e75f commit 534c2b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ember-test-helpers/isolated-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import Ember from 'ember';
export default function isolatedContainer(fullNames) {
var resolver = getResolver();
var container = new Ember.Container();
var normalize = function(fullName) {
return resolver.normalize(fullName);
};
//normalizeFullName only exists since Ember 1.9
if (Ember.typeOf(container.normalizeFullName) === 'function') {
container.normalizeFullName = normalize;
} else {
container.normalize = normalize;
}
container.optionsForType('component', { singleton: false });
container.optionsForType('view', { singleton: false });
container.optionsForType('template', { instantiate: false });
Expand Down

0 comments on commit 534c2b8

Please sign in to comment.