Skip to content

Commit

Permalink
Brought back callback in runTests but fixed cake test to show vows
Browse files Browse the repository at this point in the history
output.
  • Loading branch information
assaf committed Jan 9, 2011
1 parent 1b7b389 commit 200f4f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ reset = "\033[0m"
log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')

# Handle error, do nothing if null
# Handle error and kill the process.
onerror = (err)->
if err
process.stdout.write "#{red}#{err.stack}#{reset}\n"
Expand Down Expand Up @@ -62,10 +62,10 @@ runTests = (callback)->
log "Running test suite ...", green
exec "vows --spec", (err, stdout)->
process.stdout.write stdout
# process.stdout.write err
# callback err # <-- prevents errors from being printed with vows!
task "test", "Run all tests", -> runTests onerror

callback err if callback
task "test", "Run all tests", ->
runTests (err)->
process.stdout.on "drain", -> process.exit -1 if err


## Documentation ##
Expand Down

0 comments on commit 200f4f3

Please sign in to comment.