Updated Branches: refs/heads/lazy 8aa624316 -> 1b725b720
updates to plugin_parser tests Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/1b725b72 Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/1b725b72 Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/1b725b72 Branch: refs/heads/lazy Commit: 1b725b72085e9650f794013482c805e7e3ea49e9 Parents: 8aa6243 Author: Fil Maj <[email protected]> Authored: Wed Jun 12 16:42:05 2013 -0700 Committer: Fil Maj <[email protected]> Committed: Wed Jun 12 16:42:05 2013 -0700 ---------------------------------------------------------------------- spec/plugin_parser.spec.js | 14 ++++++++++---- src/plugin_parser.js | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1b725b72/spec/plugin_parser.spec.js ---------------------------------------------------------------------- diff --git a/spec/plugin_parser.spec.js b/spec/plugin_parser.spec.js index 15b5993..9a63154 100644 --- a/spec/plugin_parser.spec.js +++ b/spec/plugin_parser.spec.js @@ -1,4 +1,3 @@ - /** Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -17,14 +16,21 @@ specific language governing permissions and limitations under the License. */ -var cordova = require('../../cordova'), +var cordova = require('../cordova'), path = require('path'), fs = require('fs'), - plugin_parser = require('../../src/plugin_parser'), + plugin_parser = require('../src/plugin_parser'), et = require('elementtree'), - xml = path.join(__dirname, '..', 'fixtures', 'plugins', 'test', 'plugin.xml'); + xml = path.join(__dirname, 'fixtures', 'plugins', 'test', 'plugin.xml'); + +var xml_contents = fs.readFileSync(xml, 'utf-8'); describe('plugin.xml parser', function () { + var readfile; + beforeEach(function() { + readfile = spyOn(fs, 'readFileSync').andReturn(xml_contents); + }); + it('should read a proper plugin.xml file', function() { var cfg; expect(function () { http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1b725b72/src/plugin_parser.js ---------------------------------------------------------------------- diff --git a/src/plugin_parser.js b/src/plugin_parser.js index 3b1c24b..8b4582b 100644 --- a/src/plugin_parser.js +++ b/src/plugin_parser.js @@ -1,4 +1,3 @@ - /** Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
