<commit_before>var testutil = require('testutil')
  , rock = require('../lib/rock')
  , fs = require('fs')
  , path = require('path')

TEST_DIR = ''

describe('rock', function() {
  beforeEach(function() {
    TEST_DIR = testutil.createTestDir('rock')
  })

  describe('+ create', function() {
    describe('> when rock is an absolute Github HTTP repo', function() {
      it('should download the files and create the rock', function(done) {
        var repo = 'https://github.com/rocktemplates/rock-node-lib'
        GITHUB_TEST(repo, done)
      })
    })

    describe('> when rock is a relative Github HTTP repo', function() {
      it('should download the files and create the rock', function(done) {
        var repo = 'rocktemplates/rock-node-lib'
        GITHUB_TEST(repo, done)
      })
    })
  })
})

function GITHUB_TEST (repo, done) {
  var templateValues = {
    'author': '<NAME>',
    'email': '<EMAIL>',
    'project-description': 'A cool test for a sweet library.',
    'project-name': 'cool_module',
    'package-name': 'cool_module'
  }

  rock.create(TEST_DIR, repo, {templateValues: templateValues}, function(err) {<commit_msg>update tests to new Github repo<commit_after>var testutil = require('testutil')
  , rock = require('../lib/rock')
  , fs = require('fs')
  , path = require('path')

TEST_DIR = ''

describe('rock', function() {
  beforeEach(function() {
    TEST_DIR = testutil.createTestDir('rock')
  })

  describe('+ create', function() {
    describe('> when rock is an absolute Github HTTP repo', function() {
      it('should download the files and create the rock', function(done) {
        var repo = 'https://github.com/rocktemplates/node-lib'
        GITHUB_TEST(repo, done)
      })
    })

    describe('> when rock is a relative Github HTTP repo', function() {
      it('should download the files and create the rock', function(done) {
        var repo = 'rocktemplates/node-lib'
        GITHUB_TEST(repo, done)
      })
    })
  })
})

function GITHUB_TEST (repo, done) {
  var templateValues = {
    'author': '<NAME>',
    'email': '<EMAIL>',
    'project-description': 'A cool test for a sweet library.',
    'project-name': 'cool_module',
    'package-name': 'cool_module'
  }

  rock.create(TEST_DIR, repo, {templateValues: templateValues}, function(err) {
{'fraction_non_alphanumeric': 0.1552471812662619, 'fraction_numerical': 0.0, 'mean_word_length': 3.3202247191011236, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3079011', 'n_tokens_mistral': 721, 'n_tokens_neox': 712, 'n_words': 191}