module Cucumber::Core::Test::Result

def self.ok?(type, be_strict = false)

def self.ok?(type, be_strict = false)
  private
  class_name = type.to_s.slice(0, 1).capitalize + type.to_s.slice(1..-1)
  const_get(class_name).ok?(be_strict)
end

def self.query_methods(result_type)

returning true
Defines predicate methods on a result class with only the given one

Defines to_sym on a result class for the given result type
def self.query_methods(result_type)
  Module.new do
    define_method :to_sym do
      result_type
    end
    TYPES.each do |possible_result_type|
      define_method("#{possible_result_type}?") do
        possible_result_type == to_sym
      end
    end
  end
end