module ZenTestMapping

def test_to_normal(name, klassname=nil)

#normal_to_test().
symbolic names which may have been anglicised by
corresponding normal method name, taking into account
Converts a method name beginning with test to its
def test_to_normal(name, klassname=nil)
  unmunge(name.to_s.sub(/^test_/, '')) do |n|
    if defined? @inherited_methods then
      known_methods = (@inherited_methods[klassname] || {}).keys.sort.reverse
      known_methods_re = known_methods.map {|s| Regexp.escape(s) }.join("|")
      n = n.sub(/^(#{known_methods_re})(_.*)?$/) { $1 } unless
        known_methods_re.empty?
      n
    end
  end
end