File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 58
58
end
59
59
60
60
61
- ##
62
- # test/spec/mini 3
63
- # http://gist.github.com/25455
64
-
65
- #
66
- def context ( *args , &block )
67
- return super unless ( name = args . first ) && block
68
- require 'test/unit'
69
- klass = Class . new ( defined? ( ActiveSupport ::TestCase ) ? ActiveSupport ::TestCase : Test ::Unit ::TestCase ) do
70
- def self . test ( name , &block )
71
- define_method ( "test_#{ name . gsub ( /\W / , '_' ) } " , &block ) if block
72
- end
73
- def self . xtest ( *args ) end
74
- def self . setup ( &block ) define_method ( :setup , &block ) end
75
- def self . teardown ( &block ) define_method ( :teardown , &block ) end
76
- end
77
- ( class << klass ; self end ) . send ( :define_method , :name ) { name . gsub ( /\W / , '_' ) }
78
- klass . class_eval &block
79
- # XXX: In 1.8.x, not all tests will run unless anonymous classes are kept in scope.
80
- ( $test_classes ||= [ ] ) << klass
81
- end
82
-
83
61
##
84
62
# Helper to perform job classes
85
63
#
You can’t perform that action at this time.
0 commit comments