Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setupView: function() {
var _this = this;
var resolver = getResolver();
var container = this.container;
var context = this.context;
var templateName = 'template:' + this.viewName;
var template = resolver.resolve(templateName);
if (template) {
container.register(templateName, template);
container.injection(this.subjectName, 'template', templateName);
}
context.dispatcher = Ember.EventDispatcher.create();
context.dispatcher.setup({}, '#ember-testing');
this.callbacks.render = function(options) {
var containerView = Ember.ContainerView.create(merge({container: container}, options));
var view = run(function(){
var subject = context.subject();
containerView.pushObject(subject);
containerView.appendTo('#ember-testing');
setupContainer: function() {
var resolver = getResolver();
var namespace = Ember.Object.create({
Resolver: { create: function() { return resolver; } }
});
if (Ember.Application.buildRegistry) {
var registry;
registry = Ember.Application.buildRegistry(namespace);
registry.register('component-lookup:main', Ember.ComponentLookup);
this.registry = registry;
this.container = registry.container();
} else {
this.container = Ember.Application.buildContainer(namespace);
this.container.register('component-lookup:main', Ember.ComponentLookup);
}
},