summaryrefslogtreecommitdiff
path: root/lib/test/unit/assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit/assertions.rb')
-rw-r--r--lib/test/unit/assertions.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index ce28042c49..69adcd61aa 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -10,13 +10,10 @@ module Test
obj.pretty_inspect.chomp
end
- UNASSIGNED = Object.new # :nodoc:
-
- def assert(test, msg = UNASSIGNED)
+ def assert(test, msg = nil)
case msg
- when UNASSIGNED
- msg = nil
- when String, Proc
+ when String, Proc, NilClass
+ # do nothing
else
bt = caller.reject { |s| s.rindex(MiniTest::MINI_DIR, 0) }
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt