Module: ZenTestMapping

Module | ZenTestMapping
In: | lib/zentest_mapping.rb

ZenTestMapping - mapping method names from impl to test.

Method names are mapped bidirectionally in the following way:

      method      test_method
      method?     test_method_eh          (too much exposure to Canadians :)
      method!     test_method_bang
      method=     test_method_equals
      []          test_index
      *           test_times
      ==          test_equals2
      ===         test_equals3

Further, any of the test methods should be able to have arbitrary extensions put on the name to distinguish edge cases:

      method      test_method
      method      test_method_simple
      method      test_method_no_network

To allow for unmapped test methods (ie, non-unit tests), name them:

      test_integration_.*

### Methods

munge normal_to_test test_to_normal unmunge

### Public Instance methods

munge(name) {|name if block_given?| ...}
normal_to_test(name)

Generates a test method name from a normal method, taking into account names composed of metacharacters (used for arithmetic, etc

test_to_normal(name, klassname=nil)

Converts a method name beginning with test to its corresponding normal method name, taking into account symbolic names which may have been anglicised by normal_to_test().

unmunge(name) {|name if block_given?| ...}

[Validate]