summaryrefslogtreecommitdiff
path: root/test/rake/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rake/helper.rb')
-rw-r--r--test/rake/helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rake/helper.rb b/test/rake/helper.rb
index 288ff0e3b2..8c228c5cfa 100644
--- a/test/rake/helper.rb
+++ b/test/rake/helper.rb
@@ -31,6 +31,19 @@ class Rake::TestCase < MiniTest::Unit::TestCase
def setup
ARGV.clear
+ test_dir = File.basename File.dirname File.expand_path __FILE__
+
+ @rake_root = if test_dir == 'test' then
+ # rake repository
+ File.expand_path '../../', __FILE__
+ else
+ # ruby repository
+ File.expand_path '../../../', __FILE__
+ end
+
+ @rake_exec = File.join @rake_root, 'bin', 'rake'
+ @rake_lib = File.join @rake_root, 'lib'
+
@orig_PWD = Dir.pwd
@orig_APPDATA = ENV['APPDATA']
@orig_HOME = ENV['HOME']