     .log.md basedir: scratch
     .call (options) ->
       options.log message: 'ok', module: 'mecano/test/log/md'
-    .then (err, status) ->
-      return next err if err
-      status.should.be.false()
-      setTimeout ->
-        fs.readFile "#{scratch}/localhost.log", 'utf8', (err, content) ->
-          content.should.eql "ok (INFO, written by mecano/test/log/md)\n" unless err
-          next err
-      , 100
+    .write.assert
+      source: "#{scratch}/localhost.log"
+      content: "ok (INFO, written by mecano/test/log/md)\n"
+      log: false
+    .assert
+      status: false
+    .then next
 
   describe 'stdout', ->
     

    .log.md basedir: scratch
    .call (options) ->
      options.log message: 'ok'
    .then (err, status) ->
      return next err if err
      status.should.be.false()
      setTimeout ->
        fs.readFile "#{scratch}/localhost.log", 'utf8', (err, content) ->
          content.should.eql "ok\n" unless err
          next err
      , 100
  
  they 'write message and module', (ssh, next) ->
    mecano

      .call (options) ->
        options.log message: 'this is a one line output', type: 'stdout_stream'
        options.log message: null, type: 'stdout_stream'
      .write.assert
        source: "#{scratch}/localhost.log"
        content: '\n```stdout\nthis is a one line output\n```\n\n'
        log: false
      .assert
        status: false
      .then next
      
