summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-27 14:24:11 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-27 14:24:11 +0000
commitfb7988402f872b516a1b9974254fb04d2f9deee5 (patch)
treef8a416533588e4c0c9fb9374136dd35e3cd6b69d /lib
parent03b3446556d23303ce0016d3c5cf1b0d1714c6ef (diff)
merges a half of revision 5875 in MiniTest's repository into ruby_1_9_2. It corresponds to
r29259 on Ruby's trunk. -- assert_raises now lets MiniTest::Skip through. (shyouhei) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/minitest/unit.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 3e038c818f..aa5890eb4a 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -204,6 +204,14 @@ module MiniTest
begin
yield
should_raise = true
+ rescue MiniTest::Skip => e
+ details = "#{msg}#{mu_pp(exp)} exception expected, not"
+
+ if exp.include? MiniTest::Skip then
+ return e
+ else
+ raise e
+ end
rescue Exception => e
details = "#{msg}#{mu_pp(exp)} exception expected, not"
assert(exp.any? { |ex|
@@ -243,6 +251,7 @@ module MiniTest
# +send_ary+ is a receiver, message and arguments.
#
# Fails unless the call returns a true value
+ # TODO: I should prolly remove this from specs
def assert_send send_ary, m = nil
recv, msg, *args = send_ary