Lots of work on tests

This commit is contained in:
Robin Ward
2014-07-30 18:56:01 -04:00
parent b6684e7168
commit 6f36d5996d
43 changed files with 248 additions and 311 deletions

View File

@@ -6,4 +6,4 @@ function parseHTML(rawHtml) {
parser.parseComplete(rawHtml);
return builder.dom;
}
}

View File

@@ -1,17 +1,13 @@
/* global asyncTest, requirejs, require */
/* global asyncTest */
/* exported integration, testController, controllerFor, asyncTestDiscourse, fixture */
function integration(name, lifecycle) {
module("Integration: " + name, {
setup: function() {
sinon.stub(Discourse.ScrollingDOMMethods, "bindOnScroll");
sinon.stub(Discourse.ScrollingDOMMethods, "unbindOnScroll");
Ember.run(Discourse, Discourse.advanceReadiness);
if (lifecycle && lifecycle.setup) {
lifecycle.setup.call(this);
}
Discourse.reset();
},
teardown: function() {
@@ -20,8 +16,6 @@ function integration(name, lifecycle) {
}
Discourse.reset();
Discourse.ScrollingDOMMethods.bindOnScroll.restore();
Discourse.ScrollingDOMMethods.unbindOnScroll.restore();
}
});
}
@@ -32,14 +26,6 @@ function controllerFor(controller, model) {
return controller;
}
function viewClassFor(name) {
return Discourse.__container__.lookupFactory('view:' + name);
}
function componentClassFor(name) {
return Discourse.__container__.lookupFactory('component:' + name);
}
function asyncTestDiscourse(text, func) {
asyncTest(text, function () {
var self = this;