More ember-qunit fixes

This commit is contained in:
Robin Ward
2016-11-08 14:42:10 -05:00
parent 6a1c05a268
commit 7d560ea3d5
2 changed files with 54 additions and 33 deletions
@@ -36,22 +36,10 @@ export default function(name, opts) {
this.registry.register('store:main', store, { instantiate: false });
if (opts.setup) {
if (Ember.VERSION[0] === "2") {
// use closure actions instead
this.on = (actionName, fn) => this.set(actionName, fn);
}
opts.setup.call(this, store);
}
andThen(() => {
// TODO: This shouldn't be necessary
this.owner = {
hasRegistration: (...args) => this.registry.has(...args),
lookup: (...args) => this.container.lookup(...args),
_lookupFactory: (...args) => this.container.lookupFactory(...args)
};
return this.render(opts.template);
});
andThen(() => opts.test.call(this, assert));