 main = require '../lib/index'
 nock = require 'nock'
+fs = require "fs"
 
 module.exports = 
   hook: null

  fixturePath: (fileName) ->
    "#{__dirname}/fixtures/#{fileName}"

  tmpPath: (fileName) ->
    "#{__dirname}/../tmp/#{fileName}"

  cleanTmpFiles: (fileNames) ->
    for file in fileNames
      try
        fs.unlinkSync @tmpPath(file)

  notFoundPath: "/badone.tbz"
    
  setup: (cb) ->
    @createTemp()
    @nocked = nock(@requestUrl) 
                .get(@goodPath)
                .replyWithFile(200,"#{__dirname}/fixtures/success.txt")
