   {getLinter, getMessage} = require('./common')
   CP = require('child_process')
   FS = require('fs')
+  Helpers = require('../lib/helpers')
   beforeEach ->
     waitsForPromise ->
       atom.packages.activatePackage('linter').then ->

      expect(linter.views.bottomContainer.status.count).toBe(1)
  describe 'ignoreVCSIgnoredFiles', ->
    it 'ignores the file if its ignored by the VCS', ->
      repoPath = "/tmp/linter_git_repo"
      CP.execSync("rm -rf #{repoPath}")
      CP.execSync("mkdir #{repoPath}")
      CP.execSync("cd #{repoPath}; git init")
      FS.writeFileSync("#{repoPath}/.gitignore", "/test.js\n")
      FS.writeFileSync("#{repoPath}/test.js", "'use strict'\n")
      atom.config.set('linter.ignoreVCSIgnoredFiles', true)
      atom.project.addPath(repoPath)
      linterProvider = getLinter()
      spyOn(linterProvider, 'lint')
      linter.addLinter(linterProvider)

      waitsForPromise ->
        atom.workspace.open("#{repoPath}/test.js").then ->
          editor = atom.workspace.getActiveTextEditor()
          editor.insertText("a")
          editor.save()

          editor.insertText("a")
          editor.save()
          expect(linterProvider.lint).toHaveBeenCalled()
          CP.execSync("rm -f #{filePath}")
