 describe 'Linter Config', ->
   linter = null
   {getLinter, getMessage} = require('./common')
+  Path = require('path')
   CP = require('child_process')
   FS = require('fs')
   Helpers = require('../lib/helpers')
+
+  TempDir = require('os').tmpdir()
+
   beforeEach ->
     waitsForPromise ->
       atom.packages.activatePackage('linter').then ->


  describe 'ignoreMatchedFiles', ->
    it 'ignores the file if it matches pattern', ->
      filePath = '/tmp/linter_spec_test.min.js'
      FS.writeFileSync(filePath, "'use strict'\n")

      atom.config.set('linter.ignoreMatchedFiles', '/**/*.min.{js,css}')
      linterProvider = getLinter()

      expect(linter.views.bottomContainer.status.count).toBe(1)
  describe 'ignoreVCSIgnoredFiles', ->
    it 'ignores the file if its ignored by the VCS', ->
      filePath = Path.join(TempDir, 'linter_spec_ignored_vcs.min.js')
      FS.writeFileSync(filePath, 'Hello Dolly')

      atom.config.set('linter.ignoreVCSIgnoredFiles', true)
      linterProvider = getLinter()
