class Autotest

def self.with_current_path_in_load_path

since ruby 1.9 current path (path where autotest was called from) is not in $LOAD_PATH
def self.with_current_path_in_load_path
  if RUBY19 and not $LOAD_PATH.include?(File.expand_path('.')) and not $LOAD_PATH.include?('.')
    begin
      $LOAD_PATH << '.'
      result = yield
    ensure
      $LOAD_PATH.delete('.')
    end
    result
  else
    yield
  end
end