jayzes (owner)

Fork Of

Revisions

gist: 108943 Download_button fork
public
Public Clone URL: git://gist.github.com/108943.git
.autotest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# http://gist.github.com/10524
# Prevents autotest from running your entire test suite after fixing a failed test.
# Works with ZenTest 3.10.0
# Place this in your .autotest file and run autotest with RERUN=false to disable running the entire test suite
 
if ENV['RERUN'] == 'false'
 
require 'rubygems'
require 'active_support'
 
class Autotest
def run_with_not_rerunning_everything
    hook :initialize
    reset
    add_sigint_handler
 
    self.last_mtime = Time.now if $f
 
    loop do # ^c handler
      begin
        get_to_green
        hook :all_good unless self.tainted
        wait_for_changes
      rescue Interrupt
        break if self.wants_to_quit
        reset
      end
    end
    hook :quit
  end
  alias_method_chain :run, :not_rerunning_everything
end
 
end