 setPrototypeOf  = require 'inherits-ex/lib/setPrototypeOf'
 loadCfgFile     = require 'load-config-file'
 loadCfgFolder   = require 'load-config-folder'
-yaml            = require 'gray-matter/lib/js-yaml'
+yaml            = require('gray-matter/lib/parsers').yaml
 fmatterMarkdown = require 'front-matter-markdown'
 extend          = require 'util-ex/lib/_extend'
 fs              = require 'fs'
 fs.cwd          = process.cwd
+fs.path         = require 'path.js'
 Resource        = require '../src'
 
 setImmediate    = setImmediate || process.nextTick

  result

describe 'ResourceFile', ->
  loadCfgFile.register 'yml', yaml.safeLoad
  loadCfgFolder.register 'yml', yaml.safeLoad
  loadCfgFolder.register 'md', fmatterMarkdown
  loadCfgFolder.addConfig ['_config', 'INDEX', 'index', 'README']


            '<File "fixture/unknown">'
            '<File? "fixture/vfolder.md">'
          ]
          if path.isWindows
            expected = [
              '<File? "fixture\\file0.md">'
              '<Folder "fixture\\folder">': [
                '<File? "fixture\\folder\\file10.md">'
                '<Folder "fixture\\folder\\folder1">': []
              ,
                '<Folder "fixture\\folder\\folder2">': [
                  '<File? "fixture\\folder\\folder2\\test.md">'
                ]
                '<File? "fixture\\folder\\vfolder1.md">'
              ]
              '<File "fixture\\unknown">'
              '<File? "fixture\\vfolder.md">'
            ]
          result.should.be.deep.equal expected
          done()
    it 'should load a resource virtual folder', (done)->
      res = Resource 'vfolder.md', cwd: __dirname, base: 'fixture'
