Skip to content

Commit

Permalink
[test] Add MonitorMock.kill
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Dec 11, 2011
1 parent 883e712 commit 6517f74
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/helpers/mocks/monitor.js
Expand Up @@ -6,6 +6,7 @@ var MonitorMock = exports.MonitorMock = function (options) {
broadway.App.call(this, options);

this.child = new ChildProcessMock();
this.running = false;
};
util.inherits(MonitorMock, broadway.App);

Expand All @@ -16,3 +17,9 @@ MonitorMock.prototype.__defineGetter__('data', function () {
}
});

MonitorMock.prototype.kill = function (forceStop) {
this.running = false;

this.emit('stop');
};

0 comments on commit 6517f74

Please sign in to comment.