From 6517f7452398876d417ceab5de3f928da01ddda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Sun, 11 Dec 2011 14:27:52 +0100 Subject: [PATCH] [test] Add `MonitorMock.kill` --- test/helpers/mocks/monitor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/helpers/mocks/monitor.js b/test/helpers/mocks/monitor.js index fcd8344d..a46242ac 100644 --- a/test/helpers/mocks/monitor.js +++ b/test/helpers/mocks/monitor.js @@ -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); @@ -16,3 +17,9 @@ MonitorMock.prototype.__defineGetter__('data', function () { } }); +MonitorMock.prototype.kill = function (forceStop) { + this.running = false; + + this.emit('stop'); +}; +