From a213c2ed9c84f0f64f0664e820227034d078f9f9 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 9 May 2012 04:09:25 +0000 Subject: 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 --- lib/minitest/unit.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/minitest/unit.rb') 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: -- cgit v1.2.3