Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (13 sloc) 471 Bytes
# -*- ruby -*-
require 'autotest/restart'
Autotest.add_hook :initialize do |at|
at.testlib = 'minitest/unit'
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}" }
name = f.join('::').sub 'ImapToRss', 'IMAPToRSS'
name.sub 'Hsbc', 'HSBC'
end
end