-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure container and resolver normalize the same way #94
Conversation
@@ -8,6 +8,9 @@ define( | |||
__exports__["default"] = function isolatedContainer(fullNames) { | |||
var resolver = testResolver.get(); | |||
var container = new Ember.Container(); | |||
container.normalize = function(fullName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container.normalizeFullName -> https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/application.js#L958
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But Ember Data's adapterFor
etc. call container.lookup
which calls this.normalize
and that's where the problem is as ED looks for e.g. 'adapter:modelName'
which is registered as 'adapter:model-name'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting container.normalizeFullName
doesn't work - or at least it doesn't fix my problem. ED still wouldn't find the adapters etc. that I define in needs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcoow maybe old version of ember? I have no idea what exists in stable, i only work in canary.
If this isn't in stable yet please feature detect accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanpenner: yep, this is on 1.7.0 - I'll update this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanpenner fixed that
travis appears unhappy |
Yeah, seems to be a timeout:
Can you trigger a rebuild? I don't seem to have the permissions on the travis page. |
re-triggering |
@marcoow - We just landed a major refactor (thanks @dgeb), most of this functionality now lives in https://github.com/switchfly/ember-test-helpers, can you open a PR over there with this fix? |
This fixes e.g. #84