refactors asyncTestDiscourse to bind context as self

This commit is contained in:
Wojciech Zawistowski 2013-10-07 17:36:20 +02:00
parent 094b5eccca
commit 7106b27860

View File

@ -25,12 +25,10 @@ function controllerFor(controller, model) {
} }
function asyncTestDiscourse(text, func) { function asyncTestDiscourse(text, func) {
asyncTest(text, function () { asyncTest(text, function () {
var self = this;
var qunitContext = this;
Ember.run(function () { Ember.run(function () {
func.call(qunitContext); func.call(self);
}); });
}); });
} }