Sha256: b89fb9204fbe1edba6b42458d4244c8596c96046d376a0b4d682c04f03294d05

Contents?: true

Size: 990 Bytes

Versions: 29

Compression:

Stored size: 990 Bytes

Contents

require 'autotest'

class Autotest::Mms2r < Autotest

  def initialize # :nodoc:
    super
    @exceptions = /\.(git|svn)/
    @test_mappings = {
      %r%^conf/aliases.yml$% => proc { |_, m|
        ["test/test_mms2r_media.rb"]
      },
      %r%^conf/(.*)\.yml% => proc { |_, m|
        ["test/test_#{m[1].gsub(/\./,'_')}.rb"]
      },
      %r%^lib/mms2r.rb$% => proc { |_, m|
        ["test/test_mms2r_media.rb"]
      },
      %r%^lib/mms2r/media.rb$% => proc { |_, m|
        ["test/test_mms2r_media.rb"]
      },
      %r%^lib/mms2r/media/sprint.rb$% => proc { |_, m|
        ["test/test_pm_sprint_com.rb"]
      },
      %r%^test/test_.*\.rb$% => proc { |filename, _|
        filename
      }
    }
  end

  def path_to_classname(s)
    sep = File::SEPARATOR
    f = s.sub(/^test#{sep}/, '').sub(/\.rb$/, '').split(sep)
    f = f.map { |path| path.split(/_/).map { |seg| seg.capitalize }.join }
    f = f.map { |path| path =~ /^Test/ ? path : "Test#{path}"  }
    f.join
  end

end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
mms2r-3.3.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-3.2.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-3.1.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-3.0.1 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-3.0.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-2.4.1 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-2.4.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-2.3.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb
mms2r-2.2.0 vendor/plugins/mms2r/lib/autotest/mms2r.rb