diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-09-13 19:09:09 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-09-13 19:09:24 +0900 |
commit | f5993331b2737a212134cb0b9e3a7a0d417e0d58 (patch) | |
tree | 952e933f1b35ae8957344aefd6830019c6f70245 /tool/lib | |
parent | aaa9805e7e26c50f21eff01f9ca67ce366226ca4 (diff) |
Renamed skip to pend and prepared to deprecate skip method
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/test/unit/assertions.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 4ac1482b65..9d88a3a5ed 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -532,13 +532,18 @@ module Test # 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 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) |