GNTP notifier says "0 failures" even if some tests failed
I am using guard-phpunit2 with GNTP.
Even when some tests failed, Growl says like:
4 tests, 0 failures in 0 sec
The failure count is always zero, while the terminal shows the correct result like:
Finished in 30 ms
4 tests, 2 assertions, 1 failures, 1 incomplete, 1 skipped
parse_output in formatter.rb seems to fail parsing test results.
On commit 13b2502d9c8b910d05f5c48a45f190cb20ad62d5 , implementation and tests of parse_output were modified to not use PHPUnit_Extensions_Progress_ResultPrinter. However, it stays active until now and causes the problem.
Is commenting out the following line on runner.rb the best way to avoid the problem?
cmd_parts << "--printer PHPUnit_Extensions_Progress_ResultPrinter"
I'm using the gem 'terminal-notifier-guard', '~> 1.5.3', and I am also getting the problem where the growl notification always displays successful tests, even when the console shows them failing. I'm also getting the following warnings, which I posted about in a separate issue:
PHP Strict Standards: Declaration of PHPUnit_Extensions_Progress_ResultPrinter::printDefects() should be compatible with PHPUnit_TextUI_ResultPrinter::printDefects(array $defects, $type) in /Users/andrew/.rvm/gems/ruby-2.0.0-p195/gems/guard-phpunit2-0.2.7/lib/guard/phpunit/formatters/PHPUnit-Progress/PHPUnit/Extensions/Progress/ResultPrinter.php on line 14
Strict Standards: Declaration of PHPUnit_Extensions_Progress_ResultPrinter::printDefects() should be compatible with PHPUnit_TextUI_ResultPrinter::printDefects(array $defects, $type) in /Users/andrew/.rvm/gems/ruby-2.0.0-p195/gems/guard-phpunit2-0.2.7/lib/guard/phpunit/formatters/PHPUnit-Progress/PHPUnit/Extensions/Progress/ResultPrinter.php on line 14
Reading this issue, it seems like whatever change you made may be causing these notifications to appear.
Ahhh, I understand now. These lines aren't commented in the current version of this gem. Commenting them out locally seems to resolve both issues I was having.
just add :realtime => true to your guardfile