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

Imported minitest 1.3.1 r4506.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ryan 2008-12-30 09:26:27 +00:00
parent bf6c750c35
commit 70365e5deb
3 changed files with 60 additions and 5 deletions

View file

@ -119,7 +119,7 @@ module MiniTest
msg = message(msg) { "Expected #{mu_pp(exp)} to match #{mu_pp(act)}" }
assert_respond_to act, :"=~"
exp = /#{Regexp.escape(exp)}/ if String === exp && String === act
assert act =~ exp, msg
assert exp =~ act, msg
end
def assert_nil obj, msg = nil
@ -283,7 +283,7 @@ module MiniTest
msg = message(msg) { "Expected #{mu_pp(exp)} to not match #{mu_pp(act)}" }
assert_respond_to act, :"=~"
exp = /#{Regexp.escape(exp)}/ if String === exp && String === act
refute act =~ exp, msg
refute exp =~ act, msg
end
def refute_nil obj, msg = nil