Sha256: 544b5e204b51bfd05c08416fa448e883f759aa7553b8841f63c25fa0805c227c
Contents?: true
Size: 624 Bytes
Versions: 4
Compression:
Stored size: 624 Bytes
Contents
class Autotest def 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.join('::') end end Autotest.add_hook :initialize do |autotest| autotest.add_mapping(%r%^test/.*\.rb$%) do |filename, _| filename end autotest.add_mapping(%r%^lib/(.*)\.rb$%) do |_, m| ["test/#{m[1]}_test.rb"] end autotest.add_mapping(%r%^test/test_helper.rb$%) do files_matching %r%^test/.*_test\.rb$% end end Autotest.add_discovery do "testunit" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
vmsim-1.0.1 | .autotest |
vmsim-1.0.0 | .autotest |
vmsim-0.2.4 | .autotest |
vmsim-0.2.3 | .autotest |