diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/test/unit/assertions.rb | 4 | ||||
-rw-r--r-- | test/fileutils/fileasserts.rb | 4 |
3 files changed, 8 insertions, 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 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||''}") { |