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

Version Path
mms2r-1.1.1 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.10 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.11 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.12 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.2 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.3 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.4 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.5 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.6 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.7 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.8 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-1.1.9 vendor/plugins/mms2r/lib/autotest/mms2r.rb