Skip to content

Commit 44aa588

Browse files
committed
remove context test method
1 parent c8f3968 commit 44aa588

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

test/test_helper.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,6 @@
5858
end
5959

6060

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-
8361
##
8462
# Helper to perform job classes
8563
#

0 commit comments

Comments
 (0)