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:
parent
bf6c750c35
commit
70365e5deb
3 changed files with 60 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue