         matches = []
         waitsForPromise ->
           project.scan /evil/, (result) ->
-            paths.push(result.path)
+            paths.push(result.filePath)
             matches = matches.concat(result.matches)
 
         runs ->


  describe ".scan(options, callback)", ->
    describe "when called with a regex", ->
      it "calls the callback with all regex matches in all files in the project", ->
        matches = []
        waitsForPromise ->
          project.scan /(a)+/, (match) -> matches.push(match)

        runs ->
          expect(matches).toHaveLength(3)
          expect(matches[0].path).toBe project.resolve('a')
          expect(matches[0].matches).toHaveLength(3)
          expect(matches[0].matches[0]).toEqual
              matchText: 'aaa'
              lineText: 'aaa bbb'
              range: [[0, 0], [0, 3]]

      it "works with with escaped literals (like $ and ^)", ->
        matches = []
        waitsForPromise ->
          project.scan /\$\w+/, (match) -> matches.push(match)

        runs ->
          expect(matches.length).toBe 1

          {path: resultPath, matches} = matches[0]
          expect(resultPath).toBe project.resolve('a')
          expect(matches).toHaveLength 1
          expect(matches[0]).toEqual
            matchText: '$bill'
            lineText: 'dollar$bill'
            range: [[2, 6], [2, 11]]

      it "works on evil filenames", ->

        matches = []
        waitsForPromise ->
          project.scan /aaa/, paths: ['a-dir/'], (result) ->
            paths.push(result.filePath)
            matches = matches.concat(result.matches)

        runs ->
