colby-swandale/guard-codeception — pull request #5 by mobileka (2014-05-02 13:11:53+00:00)
Title: Fix notifications and parser

Hi Colby.

I had more time today and this version is much better that the previous was.

I've read about testing in Ruby and added information to README. Next time it will be easier to run tests for a non Ruby guy like me.

I've also added several tests to cover cases when Codeception outputs results with singular words (e.g. `OK (1 test, 1 assertion)`).

I also tested the code in a real project and it works well with Ruby 2.1.1.

Doing `Tests|tests` as in https://github.com/colby-swandale/guard-codeception/pull/4 is a bad idea because future Codeception versions can add something like `TESTS` and you'll be forced to rewrite the code again.

To avoid this, I've made a regexp case-insensitive which guaranties the correct result and simplifies the code.

Also I discovered that `'string'.match()` and `'string'[]` is the same thing in Ruby. In my opinion the second version looks better and is a bit more readable.