         extracted.should.be.ok
         next()
   
-  it 'should # option # not_if_exists', (next) ->
+  they 'should # option # not_if_exists', (ssh, next) ->
     # Test with invalid creates option
     mecano.extract
+      ssh: ssh
       source: "#{__dirname}/../resources/a_dir.tgz"
       destination: scratch
       not_if_exists: __dirname


lib = if process.env.MECANO_COV then 'lib-cov' else 'lib'
mecano = require "../#{lib}"
test = require './test'

describe 'extract', ->

  scratch = test.scratch @

  it 'should see extension .tgz', (next) ->
    # Test a non existing extracted dir
    mecano.extract
      source: "#{__dirname}/../resources/a_dir.tgz"
      destination: scratch
    , (err, extracted) ->

      err.message.should.eql "Failed to create 'oh_no'"
      # Test with valid creates option
      mecano.extract
        ssh: ssh
        source: "#{__dirname}/../resources/a_dir.tgz"
        destination: scratch
        creates: "#{scratch}/a_dir"
