vendor/bundle/ruby/1.8/gems/ZenTest-4.6.2/lib/autotest.rb
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 = f.map { |path| path =~ /^Test/ ? path : "Test#{path}"  }

    f.join '::'
  end
##
# Convert a path in a string, s, into a class name, changing
# underscores to CamelCase, etc.
Convert a path in a string, s, into a class name, changing
underscores to CamelCase, etc.
Convert a path in a string s into a class name changing underscores to CamelCase etc .
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 = f.map { |path| path =~ /^Test/ ? path : "Test#{path}"  }
    f.join '::'
  end
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 = f . map { | path | path =~ / ^Test / ? path : "Test#{path}" } f . join '::' end
Convert a path in a string, s, into a class name, changing
underscores to CamelCase, etc.
Convert a path in a string s into a class name changing underscores to CamelCase etc .
s