avoinministerio/avoinministerio — pull request #214 by jyrkive (2012-08-03 08:20:07+00:00)
Title: Add instructions for creating a pre-commit hook that runs automated tests

In Pull Request #168, @jaakkos set up Guard to allow us to notice easier when a change breaks something. I have Guard always running and it has often helped me.

But then I sent Pull Request #206 which broke dozens of tests. I had Guard running when I committed the changes, but Guard didn't complain about them at all. The reason is that, for performance reasons, Guard doesn't reload the environment when it changes, so Guard is not 100% reliable.

This commit extends the README by adding instructions to create a pre-commit hook that runs automated tests before each commit and keeps you from committing if some tests fail. I also adjusted existing instructions in the README. Finally, there are instructions in case you need to commit changes which cause tests to fail.