Method: MiniTest::Assertions#message
- Defined in:
- lib/minitest/unit.rb
#message(msg = nil, &default) ⇒ Object
Returns a proc that will output msg
along with the default message.
356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/minitest/unit.rb', line 356 def msg = nil, &default proc { if msg then msg = msg.to_s unless String === msg msg += '.' unless msg.empty? msg += "\n#{default.call}." msg.strip else "#{default.call}." end } end |