Refactor website with new design & structure

This commit is contained in:
Andrew Miner
2016-04-03 19:30:15 -07:00
parent ec7e8c883d
commit d69585facd
406 changed files with 7411 additions and 37859 deletions
+52
View File
@@ -0,0 +1,52 @@
#
# Crafting Guide - fs.extensions.test.coffee
#
# Copyright © 2014-2016 by Redwood Labs
# All rights reserved.
#
fs = require './fs.extensions'
########################################################################################################################
describe 'fs.extensions.coffee', ->
describe 'rmdirRfSync', ->
beforeEach ->
fs.mkdirSync '.tmp'
afterEach ->
fs.rmdirRfSync '.tmp'
it 'can remove a single file', ->
fs.writeFileSync '.tmp/alpha'
fs.rmdirRfSync '.tmp/alpha'
func = -> fs.statSync '.tmp/alpha'
expect(func).to.throw Error, 'no such file'
it 'can remove an empty directory', ->
fs.mkdirSync '.tmp/alpha'
fs.rmdirRfSync '.tmp/alpha'
func = -> fs.statSync '.tmp/alpha'
expect(func).to.throw Error, 'no such file'
it 'can remove a directory with a file', ->
fs.mkdirSync '.tmp/alpha'
fs.writeFileSync '.tmp/bravo'
fs.rmdirRfSync '.tmp/alpha'
func = -> fs.statSync '.tmp/alpha'
expect(func).to.throw Error, 'no such file'
it 'can remove a nested sub-directory with a file', ->
fs.mkdirSync '.tmp/alpha'
fs.writeFileSync '.tmp/bravo'
fs.mkdirSync '.tmp/alpha/charlie'
fs.writeFileSync '.tmp/alpha/charlie/delta'
fs.rmdirRfSync '.tmp/alpha'
func = -> fs.statSync '.tmp/alpha'
expect(func).to.throw Error, 'no such file'