cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [59/83] [abbrv] git commit: updates to plugin_parser tests
Date Fri, 14 Jun 2013 17:31:28 GMT
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/bed24d10
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/bed24d10
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/bed24d10

Branch: refs/heads/lazy
Commit: bed24d10df4f99f577746c1558635d1d23b6e28c
Parents: 74353b8
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed Jun 12 16:42:05 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Thu Jun 13 11:13:21 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/bed24d10/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/bed24d10/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


Mime
View raw message