<commit_before>rimraf = require 'rimraf'
path   = require 'path'
fs     = require 'fs'
Roots  = require 'roots'

test_template_path = path.resolve(_path, '../../')
test_path          = path.join(_path, 'tmp')
tpl = 'test-sprout-roots-base'
opts =
  config: path.join(_path, 'locals.json')

before (done) ->
  sprout.add(tpl, test_template_path)
  .then -> rimraf.sync(test_path)
  .then -> sprout.init(tpl, test_path, opts)
  .then -> h.project.install_dependencies('*', done)

after ->
  sprout.remove(tpl)

describe 'sprout', ->
  it 'inits the project properly', (done) ->
    if fs.existsSync(path.join(test_path, 'views'))
      tgt = path.join(test_path, 'views/index.jade')

    else
      tgt = path.join(test_path, 'index.jade')

    fs.existsSync(tgt).should.be.ok
    done()
<commit_msg>:lipstick: normalize code structure<commit_after>rimraf = require 'rimraf'
path   = require 'path'
fs     = require 'fs'
Roots  = require 'roots'

test_template_path = path.resolve(_path, '../../')
test_path          = path.join(_path, 'tmp')
tpl                = 'test-sprout-roots-base'
opts =
  config: path.join(_path, 'locals.json')

before (done) ->
  console.log test_template_path
  sprout.add(tpl, test_template_path)
    .then -> rimraf.sync(test_path)
    .then -> sprout.init(tpl, test_path, opts)
    .then -> h.project.install_dependencies('*', done)

after -> sprout.remove(tpl)

describe 'sprout', ->
  it 'inits the project properly', (done) ->
    if fs.existsSync(path.join(test_path, 'views'))
      tgt = path.join(test_path, 'views/index.jade')
    else
      tgt = path.join(test_path, 'index.jade')

    fs.existsSync(tgt).should.be.ok
    done()

{'fraction_non_alphanumeric': 0.16237267825044938, 'fraction_numerical': 0.0, 'mean_word_length': 3.3152454780361755, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1020224', 'n_tokens_mistral': 613, 'n_tokens_neox': 608, 'n_words': 121}