Permalink
Browse files

[test] Use `carapace.bin` in test macros

  • Loading branch information...
1 parent 5466310 commit 139e6d018fb2c1df91a653fc4c11f26759f7b68b @indexzero indexzero committed Aug 8, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 test/helper/macros.js
View
8 test/helper/macros.js
@@ -13,8 +13,6 @@ var assert = require('assert'),
request = require('request'),
carapace = require('../../lib/carapace');
-var carapaceBin = path.join(__dirname, '..', '..', 'bin', 'carapace');
-
var macros = exports;
macros.assertListen = function (port, vows) {
@@ -83,7 +81,7 @@ macros.assertSpawn = function (PORT, script, argv, vows) {
var context = {
topic: function () {
var that = this,
- child = spawn(carapaceBin, ['--hook-port', PORT, script].concat(argv));
+ child = spawn(carapace.bin, ['--hook-port', PORT, script].concat(argv));
child.stdout.once('data', that.callback.bind(null, null, child));
},
@@ -103,8 +101,8 @@ macros.assertParentSpawn = function (PORT, script, argv, cwd, vows) {
"when spawning a child carapace": {
topic: function () {
var that = this,
- child = spawn(carapaceBin, ['--hook-port', PORT].concat(argv));
-
+ child = spawn(carapace.bin, ['--hook-port', PORT].concat(argv));
+
carapace.on('*::carapace::port', function onPort (info) {
if (info.port && info.port !== carapace['hook-port']) {
that.port = info.port;

0 comments on commit 139e6d0

Please sign in to comment.