Skip to content

Commit

Permalink
Merge pull request #17 from cbrammer/master
Browse files Browse the repository at this point in the history
Mocha Test Framework
  • Loading branch information
robrighter committed Dec 31, 2011
2 parents 16069b9 + cc42891 commit 3c59355
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions initproject.sh
Expand Up @@ -6,12 +6,15 @@ mkdir ./static/css
mkdir ./static/js mkdir ./static/js
mkdir ./views mkdir ./views
mkdir ./models mkdir ./models
mkdir ./test


echo "Copying Markup and CSS BoilerPlate..." echo "Copying Markup and CSS BoilerPlate..."
cp ./templates/app/server.js ./server.js cp ./templates/app/server.js ./server.js
cp ./templates/app/package.json ./package.json cp ./templates/app/package.json ./package.json
cp ./templates/app/.gitignore ./.gitignore cp ./templates/app/.gitignore ./.gitignore
cp ./templates/app/config.json ./config.json cp ./templates/app/config.json ./config.json
cp ./templates/app/Makefile ./Makefile
cp ./templates/test/stub.js ./test/stub.js
curl https://raw.github.com/h5bp/html5-boilerplate/master/css/style.css > ./static/css/style.css curl https://raw.github.com/h5bp/html5-boilerplate/master/css/style.css > ./static/css/style.css
cp ./templates/views/500.jade ./views/500.jade cp ./templates/views/500.jade ./views/500.jade
cp ./templates/views/404.jade ./views/404.jade cp ./templates/views/404.jade ./views/404.jade
Expand Down
10 changes: 10 additions & 0 deletions templates/app/Makefile
@@ -0,0 +1,10 @@
TESTS = test/*.js

test:
@NODE_ENV=test ./node_modules/.bin/mocha \
--require should \
--reporter list \
--slow 20 \
--growl \
$(TESTS)
.PHONY: test
4 changes: 3 additions & 1 deletion templates/app/package.json
Expand Up @@ -11,7 +11,9 @@
"socket.io": "0.8.7" "socket.io": "0.8.7"
}, },
"devDependencies": { "devDependencies": {
"vows": "0.5.x" "vows": "0.5.x",
"mocha": "*",
"should": "*"
}, },
"engine": "node >= 0.6.6" "engine": "node >= 0.6.6"
} }
7 changes: 7 additions & 0 deletions templates/test/stub.js
@@ -0,0 +1,7 @@
describe('stub', function(){

describe('#test', function(){
it('should have some units tests')
})

})

0 comments on commit 3c59355

Please sign in to comment.