Permalink
Browse files

Use node 0.6 and 0.8 friendly existsSync call in mkdir test

  • Loading branch information...
1 parent c053352 commit b2d878b6b34d88340cbd365430805543f9e99b95 @justindujardin justindujardin committed Oct 29, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/tests.coffee
View
3 test/tests.coffee
@@ -108,9 +108,10 @@ test "url references", ->
#
# ensureDirectory should properly create complex output paths.
test "create complex paths that do not exist", ->
+ exist = fs.existsSync or path.existsSync
outputPath = path.join dataPath, 'complex/path/that/doesnt/exist'
exec "rm -rf #{outputPath}", ->
Docco.ensureDirectory outputPath, ->
- equal fs.existsSync(outputPath), true, 'created output path'
+ equal exist(outputPath), true, 'created output path'
stat = fs.statSync outputPath
equal stat.isDirectory(), true, "target is directory"

0 comments on commit b2d878b

Please sign in to comment.