1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert r29986: "Imported minitest 2.0.0 r5952"

This breaks test-all:
* two test-all errors (test_run_passing and test_run_failing_filtered).
* -v option to test-all is ignored

Additional to say, please describe summary of the change when you
import from external repository.

And, RUN test-all BEFORE COMMIT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-12-01 01:12:31 +00:00
parent 22b2c63855
commit 54fd6de064
10 changed files with 187 additions and 797 deletions

View file

@ -66,13 +66,10 @@ module Kernel
def describe desc, &block
stack = MiniTest::Spec.describe_stack
name = [stack.last, desc].compact.join("::")
cls = Class.new(stack.last || MiniTest::Spec)
# :stopdoc:
# omg this sucks
(class << cls; self; end).send(:define_method, :to_s) { name }
# :startdoc:
name = desc.to_s.split(/\W+/).map { |s| s.capitalize }.join + "Spec"
prev = stack.last
name = "#{prev == MiniTest::Spec ? nil : prev}::#{name}"
cls = Object.class_eval "class #{name} < #{prev}; end; #{name}"
cls.nuke_test_methods!
@ -99,7 +96,7 @@ end
class MiniTest::Spec < MiniTest::Unit::TestCase
@@describe_stack = []
@@describe_stack = [MiniTest::Spec]
def self.describe_stack # :nodoc:
@@describe_stack
end