From dd9341f02b0d058826bb1750c9f90beb8573ca0e Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Feb 2011 12:22:27 +0000 Subject: * 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 --- ChangeLog | 5 ++++- lib/test/unit/assertions.rb | 4 ++++ test/fileutils/fileasserts.rb | 4 ---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa8cb8cbde..b18f13cc8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Sat Feb 5 20:40:34 2011 Nobuyoshi Nakada +Sat Feb 5 21:22:21 2011 Nobuyoshi Nakada + + * lib/test/unit/assertions.rb (assert_block): move from + test/fileutils/fileasserts.rb. * test/fileutils/fileasserts.rb (assert_block): pass arguments as-is. [ruby-dev:43174] diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index 69adcd61aa..9a646c0867 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -21,6 +21,10 @@ module Test super end + def assert_block(*msgs) + assert yield, *msgs + end + def assert_raise(*args, &b) assert_raises(*args, &b) end diff --git a/test/fileutils/fileasserts.rb b/test/fileutils/fileasserts.rb index 97e7f964de..47a769c5dc 100644 --- a/test/fileutils/fileasserts.rb +++ b/test/fileutils/fileasserts.rb @@ -8,10 +8,6 @@ module Test yield end - def assert_block(*msgs) - assert yield, *msgs - end - def assert_same_file(from, to, message=nil) _wrap_assertion { assert_block("file #{from} != #{to}#{message&&': '}#{message||''}") { -- cgit v1.2.3