/**
 * Copyright 2014 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/

var path = require('path');

process.env.NODE_RED_HOME = process.env.NODE_RED_HOME || path.resolve(__dirname+"/../../node-red");

var helper = require(path.join(process.env.NODE_RED_HOME,
                               'test', 'nodes', 'helper.js'));
module.exports = helper;

@@ -714,17 +714,16 @@
 -red%22);%0A
-%0A
 var help
@@ -834,16 +834,113 @@
 r.js'));
+%0A%0Atry %7B%0A    helper.nock = helper.nock %7C%7C require(%22nock%22);%0A%7D catch(er) %7B%0A    helper.nock = null;%0A%7D
 %0Amodule.

Allow nock to be installed locally