diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-04 02:04:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-04 02:04:26 +0000 |
commit | 8a57298c0967f44be9d7022c29f7ceac0320ec39 (patch) | |
tree | 08d15eee612bd014ff5d9fa03651522aa3650c5c /test/lib/minitest | |
parent | 8d7f6552617f18da8fd5a03960ac5cfc78a8fb43 (diff) | |
download | ruby-8a57298c0967f44be9d7022c29f7ceac0320ec39.tar.gz |
unit.rb: no UNDEFINED
* test/lib/minitest/unit.rb (UNDEFINED): remove.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/minitest')
-rw-r--r-- | test/lib/minitest/unit.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb index 0a6558dfbb..c561abe3ed 100644 --- a/test/lib/minitest/unit.rb +++ b/test/lib/minitest/unit.rb @@ -73,12 +73,6 @@ module MiniTest # printed if the assertion fails. module Assertions - UNDEFINED = Object.new # :nodoc: - - def UNDEFINED.inspect # :nodoc: - "UNDEFINED" # again with the rdoc bugs... :( - end - ## # Returns the diff command to use in #diff. Tries to intelligently # figure out what diff to use. @@ -311,8 +305,8 @@ module MiniTest # # assert_operator 5, :<=, 4 - def assert_operator o1, op, o2 = UNDEFINED, msg = nil - return assert_predicate o1, op, msg if UNDEFINED == o2 + def assert_operator o1, op, o2 = (predicate = true; nil), msg = nil + return assert_predicate o1, op, msg if predicate msg = message(msg) { "Expected #{mu_pp(o1)} to be #{op} #{mu_pp(o2)}" } assert o1.__send__(op, o2), msg end @@ -676,8 +670,8 @@ module MiniTest # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail - def refute_operator o1, op, o2 = UNDEFINED, msg = nil - return refute_predicate o1, op, msg if UNDEFINED == o2 + def refute_operator o1, op, o2 = (predicate = true; nil), msg = nil + return refute_predicate o1, op, msg if predicate msg = message(msg) { "Expected #{mu_pp(o1)} to not be #{op} #{mu_pp(o2)}"} refute o1.__send__(op, o2), msg end |