diff --git a/spec/app/project-spec.coffee b/spec/app/project-spec.coffee index b207a4f75..a371caa75 100644 --- a/spec/app/project-spec.coffee +++ b/spec/app/project-spec.coffee @@ -118,6 +118,11 @@ describe "Project", -> expect(paths).not.toContain('a') expect(paths).toContain('b') + it "ignores files in gitignore for projects in a git tree", -> + project.setPath(require.resolve('fixtures/git/working-dir')) + paths = project.getFilePaths() + expect(paths).not.toContain('ignored.txt') + describe ".scan(options, callback)", -> describe "when called with a regex", -> it "calls the callback with all regex matches in all files in the project", -> diff --git a/spec/fixtures/git/working-dir/.gitignore b/spec/fixtures/git/working-dir/.gitignore new file mode 100644 index 000000000..09f5ff762 --- /dev/null +++ b/spec/fixtures/git/working-dir/.gitignore @@ -0,0 +1 @@ +ignored.txt \ No newline at end of file