ruby-changes:67970
From: Hiroshi <ko1@a...>
Date: Mon, 13 Sep 2021 19:10:00 +0900 (JST)
Subject: [ruby-changes:67970] f5993331b2 (master): Renamed skip to pend and prepared to deprecate skip method
https://git.ruby-lang.org/ruby.git/commit/?id=f5993331b2 From f5993331b2737a212134cb0b9e3a7a0d417e0d58 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Mon, 13 Sep 2021 19:09:09 +0900 Subject: Renamed skip to pend and prepared to deprecate skip method --- tool/lib/test/unit/assertions.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 4ac1482..9d88a3a 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -532,13 +532,18 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L532 # Skips the current test. Gets listed at the end of the run but # doesn't cause a failure exit code. - def skip msg = nil, bt = caller + def pend msg = nil, bt = caller msg ||= "Skipped, no message given" @skip = true raise Test::Unit::PendedError, msg, bt end + alias omit pend - alias omit skip + # TODO: Removed this and enabled to raise NoMethodError with skip + alias skip pend + # def skip(msg = nil, bt = caller) + # raise NoMethodError, "use omit or pend", caller + # end ## # Was this testcase skipped? Meant for #teardown. @@ -773,9 +778,6 @@ EOT https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L778 assert(failed.empty?, message(m) {failed.pretty_inspect}) end - # compatibility with test-unit - alias pend skip - def assert_syntax_error(code, error, *args, **opt) prepare_syntax_check(code, *args, **opt) do |src, fname, line, mesg| yield if defined?(yield) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/