diff --git a/build/package.json b/build/package.json index c2d9fce1b..4bfc940a2 100644 --- a/build/package.json +++ b/build/package.json @@ -26,7 +26,6 @@ "harmony-collections": "~0.3.8", "legal-eagle": "~0.9.0", "minidump": "~0.8", - "ncp": "^1.0.1", "npm": "~1.4.5", "rcedit": "~0.3.0", "request": "~2.27.0", diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index 1dcb73721..dbd0a0fbd 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -8,7 +8,6 @@ BufferedProcess = require '../src/buffered-process' {Directory} = require 'pathwatcher' GitRepository = require '../src/git-repository' temp = require "temp" -{ncp} = require "../build/node_modules/ncp" describe "Project", -> beforeEach -> @@ -235,29 +234,18 @@ describe "Project", -> directory2 = temp.mkdirSync("git-repo1") directory3 = temp.mkdirSync("git-repo2") - waitsFor (done) -> - ncp( - fs.absolute(path.join(__dirname, 'fixtures', 'git', 'master.git')), - path.join(directory2, ".git"), - done - ) + gitDirPath = fs.absolute(path.join(__dirname, 'fixtures', 'git', 'master.git')) + fs.copySync(gitDirPath, path.join(directory2, ".git")) + fs.copySync(gitDirPath, path.join(directory3, ".git")) - waitsFor (done) -> - ncp( - fs.absolute(path.join(__dirname, 'fixtures', 'git', 'master.git')), - path.join(directory3, ".git"), - done - ) + atom.project.setPaths([directory1, directory2, directory3]) - runs -> - atom.project.setPaths([directory1, directory2, directory3]) - - [repo1, repo2, repo3] = atom.project.getRepositories() - expect(repo1).toBeNull() - expect(repo2.getShortHead()).toBe "master" - expect(repo2.getPath()).toBe fs.realpathSync(path.join(directory2, ".git")) - expect(repo3.getShortHead()).toBe "master" - expect(repo3.getPath()).toBe fs.realpathSync(path.join(directory3, ".git")) + [repo1, repo2, repo3] = atom.project.getRepositories() + expect(repo1).toBeNull() + expect(repo2.getShortHead()).toBe "master" + expect(repo2.getPath()).toBe fs.realpathSync(path.join(directory2, ".git")) + expect(repo3.getShortHead()).toBe "master" + expect(repo3.getPath()).toBe fs.realpathSync(path.join(directory3, ".git")) it "calls callbacks registered with ::onDidChangePaths", -> onDidChangePathsSpy = jasmine.createSpy('onDidChangePaths spy')