mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
assertions.rb: split lines
* lib/test/unit/assertions.rb (Test::Unit::Assertions#message): split msg and default procs by period and newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3d88196632
commit
1a633537f8
1 changed files with 3 additions and 1 deletions
|
@ -322,7 +322,9 @@ EOT
|
|||
|
||||
def message(msg = nil, *args, &default)
|
||||
if Proc === msg
|
||||
super(nil, *args) {"#{msg.call}#{default.call if default}"}
|
||||
super(nil, *args) do
|
||||
[msg.call, (default.call if default)].compact.reject(&:empty?).join(".\n")
|
||||
end
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue