From 9013b3a0c9c35411ae8c788ab5e104735a99fde2 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 7 Apr 2013 18:40:17 -0500 Subject: [PATCH] Define RUBY_PATH for tests --- Library/Homebrew/global.rb | 5 ++--- Library/Homebrew/test/testing_env.rb | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index e8e0633798..da834467b1 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -63,9 +63,8 @@ end HOMEBREW_LOGS = Pathname.new('~/Library/Logs/Homebrew/').expand_path -RUBY_CONFIG = RbConfig::CONFIG -RUBY_BIN = Pathname.new("#{RUBY_CONFIG['bindir']}") -RUBY_PATH = RUBY_BIN/RUBY_CONFIG['ruby_install_name'] + RUBY_CONFIG['EXEEXT'] +RUBY_BIN = Pathname.new("#{RbConfig::CONFIG['bindir']}") +RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'] if RUBY_PLATFORM =~ /darwin/ MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index bde3503907..731ef5b860 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -12,6 +12,7 @@ require 'extend/pathname' require 'extend/string' require 'exceptions' require 'utils' +require 'rbconfig' # Constants normally defined in global.rb HOMEBREW_PREFIX = Pathname.new('/private/tmp/testbrew/prefix') @@ -26,6 +27,9 @@ HOMEBREW_WWW = 'http://example.com' HOMEBREW_CURL_ARGS = '-fsLA' HOMEBREW_VERSION = '0.9-test' +RUBY_BIN = Pathname.new("#{RbConfig::CONFIG['bindir']}") +RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'] + MACOS = true MACOS_VERSION = ENV.fetch('MACOS_VERSION', 10.6) MACOS_FULL_VERSION = '10.6.8'