mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
21 lines
No EOL
650 B
JavaScript
21 lines
No EOL
650 B
JavaScript
function integration(name) {
|
|
module(name, {
|
|
setup: function() {
|
|
sinon.stub(Discourse.ScrollingDOMMethods, "bindOnScroll");
|
|
sinon.stub(Discourse.ScrollingDOMMethods, "unbindOnScroll");
|
|
Ember.run(Discourse, Discourse.advanceReadiness);
|
|
},
|
|
|
|
teardown: function() {
|
|
Discourse.reset();
|
|
Discourse.ScrollingDOMMethods.bindOnScroll.restore();
|
|
Discourse.ScrollingDOMMethods.unbindOnScroll.restore();
|
|
}
|
|
});
|
|
}
|
|
|
|
function controllerFor(controller, model) {
|
|
var controller = Discourse.__container__.lookup('controller:' + controller);
|
|
if (model) { controller.set('model', model ); }
|
|
return controller;
|
|
} |