Permalink
Browse files

fix status.jade

  • Loading branch information...
dominictarr committed Jun 6, 2011
1 parent 1734066 commit 9bb68270ad21cf48da837c4181de1880e59ce771
Showing with 56 additions and 3 deletions.
  1. +53 −0 test/test-with-vows.asynct.js
  2. +2 −0 test/test.asynct.js
  3. +0 −1 test/tmp/dominictarr/curry
  4. +0 −1 test/tmp/substack/curry
  5. +1 −1 views/status.jade
@@ -0,0 +1,53 @@
+var Testbed = require('testbed')
+ , it = require('it-is')
+ , tmp = __dirname + '/tmp'
+ , testbed = new Testbed(tmp)
+ , exec = require('child_process').exec
+ , fs = require('fs')
+ , join = require('path').join
+
+exports.__setup = function (test){
+ exec('rm -rf ' + tmp + '; mkdir ' + tmp, test.done)
+}
+
+
+exports ['integrate a repo that uses vows'] = function (test){
+
+ var webservice = testbed.Repo('Marak','webservice.js')
+ , events = ['clone', 'init', 'update', 'tested']
+ , changes = 0
+
+ webservice.on('change',function (event){
+ changes ++
+ })
+ events.forEach(function (event){
+ webservice.on(event,
+ function check(){
+ if(~events.indexOf(event))
+ it(event).equal(events.shift())
+ })
+ })
+
+ webservice.integrate(function (err,report){
+ it(changes >= 4).ok()
+ it(events).property('length',0)
+ console.log(report)
+ it(webservice).has({
+ type: 'repo',
+ report: {status: it.typeof('string'), tests: []},
+ installation: [],
+ package: {name: it.typeof('string'), version: it.typeof('string')}
+ })
+
+ //validate a report.
+ console.log(webservice.report.tests[0].failures)
+
+/* it(report).has([{
+ tests:it.property('length',it.ok())
+ },{
+ tests:it.property('length',it.ok())
+ }])*/
+ console.log('########################',webservice.report)
+ test.done()
+ })
+}
View
@@ -107,6 +107,8 @@ exports ['integrate a repo'] = function (test){
test.done()
})
}
+
+
/*
//TODO: an module with an install error. might hade to use a install script to do this.
Submodule curry deleted from 7f255b
Submodule curry deleted from 91e6b4
View
@@ -2,7 +2,7 @@
- var status = tests.reduce(function (x,y) {
- x.tests.forEach(function (e){s.push(e.status)})
- return x.status < y.status ? x : y
-- },{status:'couldnotinstall'}).status
+- },{status:'unran', tests: []}).status
//
span(class= status)= status
span(class= 'right')

0 comments on commit 9bb6827

Please sign in to comment.