Permalink
Browse files

Add tests for standard templates

  • Loading branch information...
ben-ng committed Jul 2, 2013
1 parent 2c25292 commit 3fc40c74939a56ab9400ecb6bdf570a4df23efa5
Showing with 376 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +9 −1 Jakefile
  3. +1 −1 test/{ → cli}/cmd.js
  4. +365 −0 test/scaffolding/standard.js
View
@@ -15,3 +15,4 @@ site/log/*
.log
npm-debug.log
doc/
+test/tmp
View
@@ -2,6 +2,8 @@
require('./lib/geddy')
var fs = require('fs')
+ , path = require('path')
+ , utils = require('utilities')
, createPackageTask
, JSPAT = /\.js$/
, testTask;
@@ -61,7 +63,7 @@ testTask = new jake.TestTask('Geddy', function () {
});
desc('Run the Geddy tests');
-task('test', function () {
+task('test', ['clean'], function () {
var t = jake.Task.testBase;
t.addListener('error', function (err) {
var module
@@ -89,3 +91,9 @@ task('test', function () {
t.invoke.apply(t, arguments);
}, {async: true});
+desc('Clears the test temp dir');
+task('clean', function () {
+ tmpDir = path.join(__dirname, 'test', 'tmp');
+ utils.file.rmRf(tmpDir, {silent:true});
+ fs.mkdirSync(tmpDir);
+});
@@ -1,5 +1,5 @@
var assert = require('assert')
- , cmd = require('../lib/cmd')
+ , cmd = require('../../lib/cmd')
, Cmd = cmd.Cmd
, tests;
Oops, something went wrong.

0 comments on commit 3fc40c7

Please sign in to comment.