Skip to content
This repository
Browse code

Use node 0.6 and 0.8 friendly existsSync call in mkdir test

  • Loading branch information...
commit b2d878b6b34d88340cbd365430805543f9e99b95 1 parent c053352
Justin DuJardin justindujardin authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  test/tests.coffee
3  test/tests.coffee
@@ -108,9 +108,10 @@ test "url references", ->
108 108 #
109 109 # ensureDirectory should properly create complex output paths.
110 110 test "create complex paths that do not exist", ->
  111 + exist = fs.existsSync or path.existsSync
111 112 outputPath = path.join dataPath, 'complex/path/that/doesnt/exist'
112 113 exec "rm -rf #{outputPath}", ->
113 114 Docco.ensureDirectory outputPath, ->
114   - equal fs.existsSync(outputPath), true, 'created output path'
  115 + equal exist(outputPath), true, 'created output path'
115 116 stat = fs.statSync outputPath
116 117 equal stat.isDirectory(), true, "target is directory"

0 comments on commit b2d878b

Please sign in to comment.
Something went wrong with that request. Please try again.