Module: Kernel

Defined in:
lib/mini/spec.rb

Instance Method Summary collapse

Instance Method Details

#describe(desc, &block) ⇒ Object



51
52
53
54
55
56
# File 'lib/mini/spec.rb', line 51

def describe desc, &block
  cls = Class.new(Mini::Spec)
  Object.const_set desc.to_s.split(/\W+/).map { |s| s.capitalize }.join, cls

  cls.class_eval(&block)
end