slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
459 stars 58 forks source link

Fix for inproper exit-code on spec failures #90

Closed CraZySacX closed 10 years ago

CraZySacX commented 10 years ago

This change should resolve issue #81 where lein spec was always exiting with an exit-code of 0. This should allow for proper CI integration. The exit-if-needed function appeared to always be receiving nil, and therefore evaluating to 0 in every case.

CraZySacX commented 10 years ago

Any chance on this getting in? I'm currently using my fork successfully with Travis, would be nice to be in master.

thesoftwarephilosopher commented 10 years ago

I would merge it, but I haven't fully looked through it yet to make sure I fully understand what it does in the patch and what it used to do. I'll try to look through it in the next few days. Hopefully I can do so before @slagyr cuts the next release.

CraZySacX commented 10 years ago

Sounds good, thanks. Let me know if you have any questions. Basically, in the before code, the exit-code was always evaluating to 0, which causes issues with CI systems that rely on a non-zero exit-code when errors occur. The new code evaluates to 0 if all the tests are successful, or evaluates to the number of failed tests (up to 250) if there are failures.