diff --git a/bin/ramlev b/bin/ramlev index 77ca5a9..2ad6e32 100755 --- a/bin/ramlev +++ b/bin/ramlev @@ -48,7 +48,7 @@ process.on( 'SIGINT', function() { }); }); -ramlev.run(function(error, stats){ +ramlev.run(function(error, failures){ if (error) { if (error.message) { console.error(error.message); @@ -58,7 +58,7 @@ ramlev.run(function(error, stats){ } process.exit(1); } - if (stats.failures > 0) { + if (failures > 0) { process.exit(1); } else { process.exit(0); diff --git a/package.json b/package.json index ed4f1de..b24fdfc 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ }, "homepage": "https://github.com/cybertk/ramlev", "dependencies": { - "chai": "^1.9.1", + "chai": "^1.9.2", "chai-json-schema": "^1.1.0", "coffee-script": "^1.8.0", "jsonlint": "^1.6.2", - "mocha": "git://github.com/cybertk/mocha.git#e256565cd", + "mocha": "^1.21.5", "optimist": "^0.6.1", "raml-parser": "^0.8.7", "refaker": "^0.1.5", @@ -40,9 +40,9 @@ "devDependencies": { "grunt": "^0.4.5", "grunt-cli": "^0.1.13", - "grunt-contrib-coffee": "^0.11.1", + "grunt-contrib-coffee": "^0.12.0", "grunt-contrib-watch": "^0.6.1", - "grunt-mocha-test": "^0.11.0", + "grunt-mocha-test": "^0.12.1", "jit-grunt": "^0.8.0", "time-grunt": "^1.0.0" } diff --git a/src/ramlev.coffee b/src/ramlev.coffee index d06d7c4..78dcb7a 100644 --- a/src/ramlev.coffee +++ b/src/ramlev.coffee @@ -28,8 +28,8 @@ class Ramlev runTests = -> mocha = new Mocha _.omit(config.options, refaker_keys) generateTests raml, mocha - mocha.run -> - callback(null, mocha.reporter.stats) + mocha.run (failures)-> + callback(null, failures) try refaker _.extend({ schemas: extractSchemas(raml) }, refaker_opts), (err, refs) ->