summaryrefslogtreecommitdiff
path: root/test/minitest
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-27 06:34:23 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-27 06:34:23 +0000
commita1cef995414861c8654013464840c2c707fb53a0 (patch)
treec6e76e1b5beea25afb79807d1e285dd9991c5780 /test/minitest
parent0a88cb504baf9d4c483de63b7efa33d58ff4bdcc (diff)
* 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
Diffstat (limited to 'test/minitest')
-rw-r--r--test/minitest/test_mini_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/minitest/test_mini_test.rb b/test/minitest/test_mini_test.rb
index 6c3a2c4..934de53 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'",