action (FunctionalTestMatrix)

    # File lib/functional_test_matrix.rb, line 75
      def action(action, *results)
        testcases = @@setups.zip(results).reject { |a,b| b == :na }
        testcases = Hash[*testcases.flatten]
        matrix = @@matrix # bind to local scope for define_method closure

        testcases.each do |setup, expected|
          expected_action = expected == :OK ? action : expected
          define_method "test_#{matrix}_#{action}_#{setup}" do
            @action = action
            send "matrix_init_#{matrix}", *setup.to_s.split(/_/).map {|c| c.intern }
            send "matrix_setup_#{action}", setup, expected
            send "matrix_test_#{expected_action}", setup
          end
        end
      end