From a1cef995414861c8654013464840c2c707fb53a0 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 27 Oct 2008 06:34:23 +0000 Subject: [PATCH] * test/minitest/test_mini_test.rb: fixed that r19958 made test-all fail when the ruby was built at $(srcdir). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/minitest/test_mini_test.rb | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5d709be50..facfd683ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 27 15:32:08 2008 Yuki Sonoda (Yugui) + + * test/minitest/test_mini_test.rb: fixed that r19958 made + test-all fail when the ruby was built at $(srcdir). + Mon Oct 27 12:04:58 2008 Yuki Sonoda (Yugui) * test/ruby/envutil.rb: reverted the changeset 19948 because it diff --git a/test/minitest/test_mini_test.rb b/test/minitest/test_mini_test.rb index 6c3a2c4b4e..934de53fb0 100644 --- a/test/minitest/test_mini_test.rb +++ b/test/minitest/test_mini_test.rb @@ -28,8 +28,10 @@ class TestMiniTest < MiniTest::Unit::TestCase Object.send :remove_const, :ATestCase if defined? ATestCase end - pwd = Pathname.new(Dir.pwd) - MINITEST_BASE_DIR = Pathname.new(File.expand_path(MiniTest::MINI_DIR)).relative_path_from(pwd) + pwd = Pathname.new(File.expand_path Dir.pwd) + basedir = Pathname.new(File.expand_path(MiniTest::MINI_DIR)) + 'mini' + basedir = basedir.relative_path_from(pwd).to_s + MINITEST_BASE_DIR = basedir[/\A\./] ? basedir : "./#{basedir}" BT_MIDDLE = ["#{MINITEST_BASE_DIR}/test.rb:165:in `run_test_suites'", "#{MINITEST_BASE_DIR}/test.rb:161:in `each'", "#{MINITEST_BASE_DIR}/test.rb:161:in `run_test_suites'",