         target: "#{scratch}/empty_file"
         content: ''
         unless_exists: true
-      , (err, written) ->
-        written.should.be.true()
-      .call (options, next) ->
-        fs.readFile ssh, "#{scratch}/empty_file", 'utf8', (err, content) ->
-          return next err if err
-          content.should.eql ''
-          next()
+      , (err, status) ->
+        status.should.be.true() unless err
+      .file.assert
+        target: "#{scratch}/empty_file"
+        content: ''
       .file
         target: "#{scratch}/empty_file"
         content: 'toto'

        target: "#{scratch}/empty_file"
        content: ''
        unless_exists: true
      , (err, written) ->
        written.should.be.false()
      .call (options, next) ->
        fs.readFile ssh, "#{scratch}/empty_file", 'utf8', (err, content) ->
          return next err if err
          content.should.eql 'toto'
          next()
      .then next

    they 'handle integer type', (ssh, next) ->
      mecano.file
        ssh: ssh
        target: "#{scratch}/a_file"
        content: 123
      , (err, written) ->
        return next err if err
        written.should.be.true()
        fs.readFile ssh, "#{scratch}/a_file", 'ascii', (err, content) ->
          return next err if err
          content.should.eql '123'
          next()
    
    they 'create parent directory', (ssh, next) ->
      mecano.file
        ssh: ssh
        target: "#{scratch}/a/missing/dir/a_file"
        content: 'hello'
      , (err, written) ->
        return next err if err
        written.should.be.true()
        fs.readFile ssh, "#{scratch}/a/missing/dir/a_file", 'utf8', (err, content) ->
          return next err if err
          content.should.eql 'hello'
          next()

  describe 'link', ->


        content: 'ok'
        target: "#{scratch}/link"
        unlink: true
      .assert.file
        target: "#{scratch}/target"
        content: 'ko'
      .assert.file
        target: "#{scratch}/link"
        content: 'ok'
      .then next

    they 'dont follow link if option "unlink" and link is directory', (ssh, next) ->
