From 7106b278609bc6b5b2fed1a376fb2b51cb682265 Mon Sep 17 00:00:00 2001 From: Wojciech Zawistowski Date: Mon, 7 Oct 2013 17:36:20 +0200 Subject: [PATCH] refactors asyncTestDiscourse to bind context as self --- test/javascripts/helpers/qunit_helpers.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/javascripts/helpers/qunit_helpers.js b/test/javascripts/helpers/qunit_helpers.js index 5254c24ae56..be6e4222550 100644 --- a/test/javascripts/helpers/qunit_helpers.js +++ b/test/javascripts/helpers/qunit_helpers.js @@ -25,12 +25,10 @@ function controllerFor(controller, model) { } function asyncTestDiscourse(text, func) { - asyncTest(text, function () { - - var qunitContext = this; + var self = this; Ember.run(function () { - func.call(qunitContext); + func.call(self); }); }); } \ No newline at end of file