From bc9c95d77de00b2dc911bba460f91c1f0a847a3e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 5 Sep 2013 18:28:48 +0800 Subject: [PATCH] :lipstick: fix the protocol module spec on OS X. --- spec/api/protocol.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 0f3176d..9459d33 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -114,8 +114,11 @@ describe 'protocol API', -> free() assert false, 'Got error: ' + errorType + ' ' + error protocol.interceptProtocol targetScheme, (request) -> - pathInUrl = path.normalize request.url.substr(8) - assert.equal pathInUrl, __filename + if process.platform is 'win32' + pathInUrl = path.normalize request.url.substr(8) + assert.equal pathInUrl, __filename + else + assert.equal request.url, "#{targetScheme}://#{__filename}" it 'can override original protocol handler', (done) -> handler = remote.createFunctionWithReturnValue 'valar morghulis' -- 2.7.4