Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/467#discussion_r72538082 --- Diff: cordova-lib/spec-cordova/platform.spec.js --- @@ -356,3 +356,123 @@ describe('plugin add and rm end-to-end --fetch', function () { .fin(done); }, 60000); }); + +describe('cocoapod plugin add and rm end-to-end', function () { + + var tmpDir = helpers.tmpDir('cocoapod_plugin_test'); + var project = path.join(tmpDir, 'hello4'); + + var samplePlugin = path.resolve('./spec-cordova/fixtures/plugins/sample-cordova-plugin-cocoapod-dependent'); + var overlappingDependencyPlugin = path.resolve('./spec-cordova/fixtures/plugins/sample-cocoapod-plugin-overlapping-dependency'); + var AFNetworking = 'AFNetworking', + CWStatusBarNotification = 'CWStatusBarNotification'; + var podfile, podsJSON, workspace; + + beforeEach(function() { + shell.exec('pwd'); + process.chdir(tmpDir); + }); + + afterEach(function() { + process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. + shell.rm('-rf', tmpDir); + }); + + it('installs and uninstalls plugin depending on new pod and existing pod', function(done) { + + cordova.raw.create('hello4') + .then(function() { + process.chdir(project); + //TODO: change this to cordova-ios on npm + return cordova.raw.platform('add', 'https://github.com/juliascript/cordova-ios.git#CB-9825'); + }) + .then(function() { + return cordova.raw.plugin('add', samplePlugin); + }) + .then(function() { + podfile = path.resolve('./platforms/ios/Podfile'); + podsJSON = path.resolve('./platforms/ios/pods.json'); + workspace = path.resolve('./platforms/ios/HelloCordova.xcworkspace'); + + //podfile should have been created + fs.exists(podfile, function(podfileExists){ + expect(podfileExists); + }); + + //pods.json should have been created + fs.exists(podsJSON, function(podsJSONExists){ + expect(podsJSONExists); + }); + + //workspace should have been created + fs.exists(workspace, function(workspaceCreated){ + expect(workspaceCreated); + }); + + delete require.cache[require.resolve(podfile)]; --- End diff -- You don't need to do this delete for podfile since you don't require('podfile')
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org