mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/assertions.rb (assert_block): move from
test/fileutils/fileasserts.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
790f43a374
commit
dd9341f02b
3 changed files with 8 additions and 5 deletions
|
@ -1,4 +1,7 @@
|
||||||
Sat Feb 5 20:40:34 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Feb 5 21:22:21 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit/assertions.rb (assert_block): move from
|
||||||
|
test/fileutils/fileasserts.rb.
|
||||||
|
|
||||||
* test/fileutils/fileasserts.rb (assert_block): pass arguments
|
* test/fileutils/fileasserts.rb (assert_block): pass arguments
|
||||||
as-is. [ruby-dev:43174]
|
as-is. [ruby-dev:43174]
|
||||||
|
|
|
@ -21,6 +21,10 @@ module Test
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def assert_block(*msgs)
|
||||||
|
assert yield, *msgs
|
||||||
|
end
|
||||||
|
|
||||||
def assert_raise(*args, &b)
|
def assert_raise(*args, &b)
|
||||||
assert_raises(*args, &b)
|
assert_raises(*args, &b)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,10 +8,6 @@ module Test
|
||||||
yield
|
yield
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_block(*msgs)
|
|
||||||
assert yield, *msgs
|
|
||||||
end
|
|
||||||
|
|
||||||
def assert_same_file(from, to, message=nil)
|
def assert_same_file(from, to, message=nil)
|
||||||
_wrap_assertion {
|
_wrap_assertion {
|
||||||
assert_block("file #{from} != #{to}#{message&&': '}#{message||''}") {
|
assert_block("file #{from} != #{to}#{message&&': '}#{message||''}") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue