Revisions

gist: 223200 Download_button fork
public
Public Clone URL: git://gist.github.com/223200.git
Embed All Files: show embed
Text #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def Feature(name, &block)
  test_class = Class.new(class_name(name), Test::Unit::TestCase)
  test_class.class_eval do
    def default_test
      statements = []
      ObjectSpace.each_object(Statement) { |s| statements << s }
      statements.reverse.each { |s| s.block.call }
    end
  end
 
  test_class.class_eval(&block)
 
end