Zentest - How to stop automatic testing when red

I'm trying to set up an autotest so that when I run my test suite and I have a failed test, the autotest stops testing and waits for me to make changes before retesting. With my current configuration, autotest is constantly testing testing when it encounters a failed test, which makes it a bit of a hassle to deal with (having to log into the terminal and stop the autotest server every time I get a failed test).

I am working on a rail application using RSpec, Zentest and Spork.

Matching gem options:

autotest (4.4.6)
rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
spork (0.9.0.rc8)
ZenTest (4.5.0)

My .autotest file is:

module Autotest::Notify
  def self.notify title, msg, img, pri='low', time=3000
    `notify-send -i #{img} -u #{pri} -t #{time} '#{msg}'`
  end

  Autotest.add_hook :ran_command do |autotest|
    results = [autotest.results].flatten.join("\n")
    output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+pending)?/)
    folder = "~/.autotest_icons/"
    if output  =~ /[1-9]\d*\sfailures?/
      notify "FAIL:", "#{output}", folder+"failed.png", 'critical', 10000
    elsif output  =~ /[1-9]\d*\spending?/
      notify "PENDING:", "#{output}", folder+"pending.png", 'normal', 10000
    else
      notify "PASS:", "#{output}", folder+"passed.png"
    end
  end
end

. .autotest , , Linux, , .

, Autotest. RDoc Zentest, - .

, ..

+5
2

, , . , .autotest, :

Autotest.add_hook :initialize do |at|
  at.add_exception(%r{^\./\.git})
  at.add_exception(%r{^\./log})
end
+4

ZenTest, , , ZenTest . IIRC, , - , , ZenTest , .

, Growl, , ( Mac).

, / .autotest, .

( : Spork , )

+1

All Articles