Permalink
Browse files

fixing integration tests

  • Loading branch information...
1 parent 62e8e6c commit d8d9b9dc1e9acc3fbae439a6c7eea3f6a148ffff @metakeule committed Apr 13, 2012
Showing with 13 additions and 10 deletions.
  1. +12 −9 Cakefile
  2. +1 −1 integration_tests/test-persona-views.coffee
View
@@ -14,18 +14,21 @@ build = (watch, callback) ->
coffee.stderr.on 'data', (data) -> print data.toString()
coffee.on 'exit', (status) -> callback?() if status is 0
-
integration_tests = () ->
files = fs.readdirSync('integration_tests')
i = 0
- run_test = (file) ->
- exec "node_modules/mocha/bin/mocha --compilers coffee:coffee-script integration_tests/#{file}", (err, stdout, stderr) ->
- print stdout if stdout?
- print stderr if stderr?
- i += 1
- run_test(files[i]) if i < files.size
- run_test(files[0])
-
+ run_test = () ->
+ return if i >= files.length
+ file = files[i]
+ i += 1
+ if file.match /test/
+ exec "node_modules/mocha/bin/mocha --compilers coffee:coffee-script integration_tests/#{file}", (err, stdout, stderr) ->
+ print stdout if stdout?
+ print stderr if stderr?
+ run_test()
+ else
+ run_test()
+ run_test()
task 'docs', 'Generate annotated source code with Docco', ->
fs.readdir 'src', (err, contents) ->
@@ -85,7 +85,7 @@ describe "a view", ->
assert.equal 3, docs.length
assert.equal docs[0].year, 2008
assert.equal docs[1].year, 2009
- assert.equal docs[1].year, 1979
+ assert.equal docs[2].year, 1979
done()
it "should find authors", (done) ->

0 comments on commit d8d9b9d

Please sign in to comment.