analyze_test (ZenTest)

    # File lib/zentest.rb, line 370
      def analyze_test(testklassname)
        klassname = self.convert_class_name(testklassname)

        # CUT might be against a core class, if so, slurp it and analyze it
        if $stdlib[klassname] then
          self.process_class(klassname, true)
          self.analyze_impl(klassname)
        end

        if @klasses[klassname] then
          methods, testmethods = methods_and_tests(klassname,testklassname)

          # check that each test method has a method
          testmethods.each_key do | testmethodname |
            if testmethodname =~ /^test_(?!integration_)/ then

              # try the current name
              methodname = test_to_normal(testmethodname, klassname)
              orig_name = methodname.dup

              found = false
              until methodname == "" or methods[methodname] or @inherited_methods[klassname][methodname] do
                  # try the name minus an option (ie mut_opt1 -> mut)
                if methodname.sub!(/_[^_]+$/, '') then
                  if methods[methodname] or @inherited_methods[klassname][methodname] then
                    found = true
                  end
                else
                  break # no more substitutions will take place
                end
              end # methodname == "" or ...

              unless found or methods[methodname] or methodname == "initialize" then
                self.add_missing_method(klassname, orig_name)
              end

            else # not a test_.* method
              unless testmethodname =~ /^util_/ then
                puts "# WARNING Skipping #{testklassname}\##{testmethodname}" if $DEBUG
              end
            end # testmethodname =~ ...
          end # testmethods.each_key
        else # ! @klasses[klassname]
          puts "# ERROR class #{klassname} does not exist" if $DEBUG
          @error_count += 1

          @test_klasses[testklassname].keys.each do |testmethodname|
            @missing_methods[klassname][test_to_normal(testmethodname)] = true
          end
        end # @klasses[klassname]
      end