Sha256: 10c7ee6a13f408522facab47512e11136a6a119950b5c027716fd8e39397ee39
Contents?: true
Size: 864 Bytes
Versions: 13
Compression:
Stored size: 864 Bytes
Contents
require 'autotest' class Autotest::Mms2r < Autotest def initialize # :nodoc: super @exceptions = /\.svn|test\/files|test\/test_helper|doc\/|lib\/vendor|coverage\// @test_mappings = { %r%^conf/(mms2r_.*media)_(subject|transform|ignore)\.yml% => proc { |_, m| ["test/test_#{m[1]}.rb"] }, %r%^lib/mms2r/(.+)\.rb$% => proc { |_, m| ["test/test_mms2r_#{m[1]}.rb"] }, %r%^lib/mms2r.rb$% => proc { |_, m| ["test/test_mms2r_media.rb"] }, %r%^test/test_mms2r_.*media\.rb$% => proc { |filename, _| filename } } end def path_to_classname(s) f = s.sub(/.*test_mms2r_(.+).rb$/, '\1') f = f.map { |path| path.split(/_/).map { |seg| seg.capitalize }.join } f.unshift("MMS2R") l = f.pop f.push( l =~ /Test$/ ? l : "#{l}Test" ) f.join('::') end end
Version data entries
13 entries across 13 versions & 1 rubygems