diff options
-rw-r--r-- | spec/mspec/lib/mspec/helpers/tmp.rb | 9 | ||||
-rwxr-xr-x | spec/mspec/spec/fixtures/my_ruby | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/spec/mspec/lib/mspec/helpers/tmp.rb b/spec/mspec/lib/mspec/helpers/tmp.rb index 5062991d63..b2a38ee983 100644 --- a/spec/mspec/lib/mspec/helpers/tmp.rb +++ b/spec/mspec/lib/mspec/helpers/tmp.rb @@ -4,7 +4,14 @@ # directory is empty when the process exits. SPEC_TEMP_DIR_PID = Process.pid -SPEC_TEMP_DIR = File.expand_path(ENV["SPEC_TEMP_DIR"] || "rubyspec_temp/#{SPEC_TEMP_DIR_PID}") + +if spec_temp_dir = ENV["SPEC_TEMP_DIR"] + spec_temp_dir = File.realdirpath(spec_temp_dir) +else + spec_temp_dir = "#{File.realpath(Dir.pwd)}/rubyspec_temp/#{SPEC_TEMP_DIR_PID}" +end +SPEC_TEMP_DIR = spec_temp_dir + SPEC_TEMP_UNIQUIFIER = "0" at_exit do diff --git a/spec/mspec/spec/fixtures/my_ruby b/spec/mspec/spec/fixtures/my_ruby index 4d552f27fb..eeda3eeeec 100755 --- a/spec/mspec/spec/fixtures/my_ruby +++ b/spec/mspec/spec/fixtures/my_ruby @@ -1,4 +1,4 @@ #!/usr/bin/env bash echo $RUBY_EXE -ruby "$@" +exec ruby "$@" |