module Autotest::CucumberMixin

def run

def run
  hook :initialize
  reset
  reset_features
  add_sigint_handler
  self.last_mtime = Time.now if $f
  loop do # ^c handler
    begin
      get_to_green
      if self.tainted then
        rerun_all_tests
        rerun_all_features if all_good
      else
        hook :all_good
      end
      wait_for_changes
      # Once tests and features are green, reset features every
      # time a file is changed to see if anything breaks.
      reset_features
    rescue Interrupt
      break if self.wants_to_quit
      reset
      reset_features
    end
  end
  hook :quit
end