Skip to content
Newer
Older
100644 18 lines (13 sloc) 454 Bytes
335d50d @drbrain An RDoc spellchecker
drbrain authored Apr 5, 2012
1 # -*- ruby -*-
2
3 require 'autotest/restart'
4
5 Autotest.add_hook :initialize do |at|
6 at.testlib = 'minitest/autorun'
7 at.add_exception '.git'
8
9 def at.path_to_classname s
10 sep = File::SEPARATOR
11 f = s.sub(/^test#{sep}/, '').sub(/\.rb$/, '').split(sep)
12 f = f.map { |path| path.split(/_|(\d+)/).map { |seg| seg.capitalize }.join }
13 f = f.map { |path| path =~ /^Test/ ? path : "Test#{path}" }
14 f.join('::').gsub('Rdoc', 'RDoc')
15 end
16 end
17
Something went wrong with that request. Please try again.