ruby-changes:53716
From: nobu <ko1@a...>
Date: Fri, 23 Nov 2018 10:57:30 +0900 (JST)
Subject: [ruby-changes:53716] nobu:r65932 (trunk): split each assert_nothing_raised
nobu 2018-11-23 10:57:26 +0900 (Fri, 23 Nov 2018) New Revision: 65932 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65932 Log: split each assert_nothing_raised Modified files: trunk/test/ruby/test_dir.rb Index: test/ruby/test_dir.rb =================================================================== --- test/ruby/test_dir.rb (revision 65931) +++ test/ruby/test_dir.rb (revision 65932) @@ -370,13 +370,17 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L370 ENV.delete("LOGDIR") ENV["HOME"] = @nodir - assert_nothing_raised(ArgumentError) { + assert_nothing_raised(ArgumentError) do assert_equal(@nodir, Dir.home) + end + assert_nothing_raised(ArgumentError) do assert_equal(@nodir, Dir.home("")) - if user = ENV["USER"] + end + if user = ENV["USER"] + assert_nothing_raised(ArgumentError) do assert_equal(File.expand_path("~#{user}"), Dir.home(user)) end - } + end %W[no:such:user \u{7559 5b88}:\u{756a}].each do |user| assert_raise_with_message(ArgumentError, /#{user}/) {Dir.home(user)} end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/