Sha256: caf5b6feb67ee27cd89d9729386414b5dc5756316ef13887c2f7dc60ef931ab8

Contents?: true

Size: 687 Bytes

Versions: 6

Compression:

Stored size: 687 Bytes

Contents

require 'autotest/restart'

Autotest.add_hook :run_command do |_, cmd|
  system "#{Gem.ruby} -rubygems #{Gem.bin_path 'rake', 'rake'} generate"
  cmd.sub! ' -e ', ' -we '
  cmd.sub! "'minitest'", "'minitest', '~> 4.7'"
end

Autotest.add_hook :initialize do |at|
  at.testlib = ''
  at.add_exception '.git'

  def at.path_to_classname s
    sep = File::SEPARATOR
    f = s.sub(/^test#{sep}/, '').sub(/\.rb$/, '').split(sep)
    f = f.map { |path| path.split(/_|(\d+)/).map { |seg| seg.capitalize }.join }
    f = f.map { |path| path =~ /^Test/ ? path : "Test#{path}"  }
    f.join('::').
      gsub('Rdoc', 'RDoc').
      gsub('Ri', 'RI').
      gsub('Changelog', 'ChangeLog')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rdoc-4.3.0 .autotest
rdoc-5.0.0.beta2 .autotest
rdoc-5.0.0.beta1 .autotest
rdoc-4.2.2 .autotest
rdoc-4.2.1 .autotest
rdoc-4.2.0 .autotest