Sha256: b72045369e8a6f57097d2280bc323545cf29520949b0d0890a089fa36b90d29b

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

# vim: filetype=ruby

require 'autotest/restart'

Autotest.add_hook :initialize do |at|
  at.testlib = 'minitest/unit' if at.respond_to? :testlib=

  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('::').sub('Rdoc', 'RDoc').sub('Ri', 'RI')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rdoc-2.5 .autotest