alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-17 22:00 UTC
[OT] autotest + Growl problem : garbled notification text
Hi all, I''m trying to setup autotest (gem zentest 3.4.1.) to send notifications to Growl (see .autotest contents below) It works fine when all the tests pass, and displays the following notification : 1 tests, 0 assertions, 0 failures, 0 errors BUT when a test fails, the notification looks like this: 0x226e0dc @new_record=true, @errors=#<ActiveRecord::Errors:0x226908c @base=#<User:0x226e0dc ...>, @errors I tried all the different autotest config code I could find on the web, but the only one that works is the one below. Any idea? TIA Alain file <project_root>/.autotest : ------------------------------- require ''autotest/redgreen'' module Autotest::Growl def self.growl title, msg, pri=0, stick="" system "growlnotify -n autotest --image ./public/images/rails.png -p #{pri} -m #{msg.inspect} #{title} #{stick}" end Autotest.add_hook :ran_command do |at| output = at.results.slice(/(\d+).*errors/) if output =~ /@errors/ # if output =~ /ns.*[1-9]/ growl "Test FAILED - #{at.results.class}", "#{output}", 2, "-s" else growl "All Tests passed", "#{output}" end end end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Eric Hodel
2006-Oct-18 01:46 UTC
Re: [OT] autotest + Growl problem : garbled notification text
On Oct 17, 2006, at 3:00 PM, alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I''m trying to setup autotest (gem zentest 3.4.1.) to send > notifications > to Growl (see .autotest contents below) > > It works fine when all the tests pass, and displays the following > notification : > 1 tests, 0 assertions, 0 failures, 0 errors > > BUT when a test fails, the notification looks like this: > 0x226e0dc @new_record=true, > @errors=#<ActiveRecord::Errors:0x226908c @base=#<User:0x226e0dc ...>, > @errors > > I tried all the different autotest config code I could find on the > web, > but the only one that works is the one below. > > Any idea?Maybe you should file a bug? http://rubyforge.org/tracker/?group_id=419 Or email the authors directly? -- Eric Hodel - drbrain-48TerJ1FxhPk1uMJSBkQmQ@public.gmane.org - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---