Closed ghost closed 9 years ago
Here is how I do this without sugar:
var call = Meteor.call;
// data is the argument of the method we mock
spyOn(Meteor, 'call').and.callFake(function (method, data, callback) {
if (method === 'myMeteorMethod') {
callback(null, 'result');
} else {
call.apply(Meteor, arguments);
}
});
Released with 0.1.0
should be available and not affect other Meteor methods.