1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rake/helper.rb (Rake::TestCase#setup): revert r37669.

@orig_PWD should be the original pwd.

* test/rake/test_*.rb: don't use @orig_PWD to load libraries.
  It should be specified with relative path from the file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-11-16 03:49:09 +00:00
parent 48aab9e032
commit a632fe43d8
7 changed files with 17 additions and 9 deletions

View file

@ -1,3 +1,11 @@
Fri Nov 16 12:36:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
* test/rake/helper.rb (Rake::TestCase#setup): revert r37669.
@orig_PWD should be the original pwd.
* test/rake/test_*.rb: don't use @orig_PWD to load libraries.
It should be specified with relative path from the file.
Fri Nov 16 10:22:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
* test/rake/helper.rb (Rake::TestCase#setup): @orig_PWD shouldn't be

View file

@ -31,7 +31,7 @@ class Rake::TestCase < MiniTest::Unit::TestCase
def setup
ARGV.clear
@orig_PWD = File.expand_path('../../..', __FILE__)
@orig_PWD = Dir.pwd
@orig_APPDATA = ENV['APPDATA']
@orig_HOME = ENV['HOME']
@orig_HOMEDRIVE = ENV['HOMEDRIVE']

View file

@ -4,8 +4,8 @@ require 'open3'
class TestRakeBacktrace < Rake::TestCase
# TODO: factor out similar code in test_rake_functional.rb
def rake(*args)
lib = File.join(@orig_PWD, "lib")
bin_rake = File.join(@orig_PWD, "bin", "rake")
lib = File.expand_path('../../../lib', __FILE__)
bin_rake = File.expand_path('../../../bin/rake', __FILE__)
Open3.popen3(RUBY, "-I", lib, bin_rake, *args) { |_, _, err, _| err.read }
end

View file

@ -116,7 +116,7 @@ class TestRakeFileTask < Rake::TestCase
end
def load_phony
load File.join(@orig_PWD, "lib/rake/phony.rb")
load File.expand_path('../../../lib/rake/phony.rb', __FILE__)
end
end

View file

@ -5,8 +5,8 @@ require 'open3'
class TestRakeFunctional < Rake::TestCase
def setup
@rake_path = File.expand_path("bin/rake")
lib_path = File.expand_path("lib")
@rake_path = File.expand_path("../../../bin/rake", __FILE__)
lib_path = File.expand_path("../../../lib", __FILE__)
@ruby_options = ["-I#{lib_path}", "-I."]
@verbose = ENV['VERBOSE']

View file

@ -10,7 +10,7 @@ class TestRakeRakeTestLoader < Rake::TestCase
ARGV.replace %w[foo.rb test_*.rb -v]
load File.join(@orig_PWD, 'lib/rake/rake_test_loader.rb')
load File.expand_path('../../../lib/rake/rake_test_loader.rb', __FILE__)
assert_equal %w[-v], ARGV
ensure

View file

@ -4,8 +4,8 @@ require 'open3'
class TestRakeReduceCompat < Rake::TestCase
# TODO: factor out similar code in test_rake_functional.rb
def rake(*args)
lib = File.join(@orig_PWD, "lib")
bin_rake = File.join(@orig_PWD, "bin", "rake")
lib = File.expand_path('../../../lib', __FILE__)
bin_rake = File.expand_path('../../../bin/rake', __FILE__)
Open3.popen3(RUBY, "-I", lib, bin_rake, *args) { |_, out, _, _| out.read }
end