aboutsummaryrefslogtreecommitdiffstats
path: root/lib/minitest/unit.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-09 04:09:25 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-09 04:09:25 +0000
commita213c2ed9c84f0f64f0664e820227034d078f9f9 (patch)
treedbc503f2118fdb51f0c45ebf36ead1b799286468 /lib/minitest/unit.rb
parent2dece928e085d25e8326455b9c0f508a2d70d02d (diff)
downloadruby-a213c2ed9c84f0f64f0664e820227034d078f9f9.tar.gz
Imported minitest 3.0.0 (r7435) w/ fixes for rubygems. 10955 tests, 2253343 assertions, 1 failures, 1 errors, 28 skips minus drb tests on x86_64-darwin11.3.0 and reviewed by drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/minitest/unit.rb')
-rw-r--r--lib/minitest/unit.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 9d9439c552..50c1fac94b 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -193,7 +193,7 @@ module MiniTest
# Fails unless the block returns a true value.
def assert_block msg = nil
- warn "NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert. It will be removed on or after 2012-06-01."
+ warn "NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert. It will be removed on or after 2012-06-01. Called from #{caller.first}"
msg = message(msg) { "Expected block to return true value" }
assert yield, msg
end
@@ -281,8 +281,8 @@ module MiniTest
def assert_match matcher, obj, msg = nil
msg = message(msg) { "Expected #{mu_pp matcher} to match #{mu_pp obj}" }
- assert_respond_to obj, :"=~"
- matcher = Regexp.new Regexp.escape matcher if String === matcher and obj.respond_to?(:to_str)
+ assert_respond_to matcher, :"=~"
+ matcher = Regexp.new Regexp.escape matcher if String === matcher
assert matcher =~ obj, msg
end
@@ -582,8 +582,8 @@ module MiniTest
def refute_match matcher, obj, msg = nil
msg = message(msg) {"Expected #{mu_pp matcher} to not match #{mu_pp obj}"}
- assert_respond_to obj, :"=~"
- matcher = Regexp.new Regexp.escape matcher if String === matcher and obj.respond_to?(:to_str)
+ assert_respond_to matcher, :"=~"
+ matcher = Regexp.new Regexp.escape matcher if String === matcher
refute matcher =~ obj, msg
end
@@ -652,7 +652,7 @@ module MiniTest
end
class Unit # :nodoc:
- VERSION = "2.12.1" # :nodoc:
+ VERSION = "3.0.0" # :nodoc:
attr_accessor :report, :failures, :errors, :skips # :nodoc:
attr_accessor :test_count, :assertion_count # :nodoc: