I've read about integrating Growl with Autotest/RSpec to display test results.
For cygwin users - here is a snippet that will play a sound after autotest runs.
Add the code below to your ~/.autotest file.
Modify the path of the .wav file to the sounds you want to play on your system.

Cheers, Andy

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Module AddSoundtoAutoTestforCygwin

  Autotest.add_hook :ran_command do |at|
    results = [at.results].flatten.join("\n")
    output = 
results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not 
implemented)?/)
    if output
      if $~[2].to_i > 0
        `cat /cygdrive/c/i386/ringout.wav > /dev/dsp`     # failure
      else
        `cat /cygdrive/c/i386/chimes.wav > /dev/dsp`    # success
      end
    end
  end

end
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to