guard/guard-test — pull request #21 by carlost (2011-12-19 13:42:57+00:00)
Title: Guard::Test::Notifier.notify - did not use :failed image if test results included errors but NO failures

I am a github/ruby noob so i apologize if the pull request is screwy.

==hole is spec coverage==
the notifier_spec.rb covered results with errors and no failures as well as failures and no errors. unfortunately the spec used the "any_args" argument matcher when setting up the expectations for how Guard::Notifier.notify would be invoked. "any_args" causes any value to be accepted for all of the args. I replaced this with the use of the "anything" arg matcher for the first argument - which accepts any value for just the first argument.

==use of result.passed?==
i changed Guard::Test::Notifier.notify to determine success/failure based on the value returned by "passed?". I refactored the spec a little bit. this was done to dry up the options used to generate the mock and to ensure that the return value for "passed?" was derived.

Please let me know if you want me to make any additional changes to the spec or lib class.

Carlos