2004-11-20 13:58:20 +00:00
|
|
|
require 'rbconfig'
|
2008-10-15 04:16:28 +00:00
|
|
|
|
2008-10-16 13:55:09 +00:00
|
|
|
require 'test/unit'
|
2008-10-19 15:59:35 +00:00
|
|
|
|
2012-06-08 07:19:38 +00:00
|
|
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
2011-03-09 22:32:29 +00:00
|
|
|
$LOAD_PATH << src_testdir
|
2011-07-08 23:39:42 +00:00
|
|
|
module Gem
|
|
|
|
end
|
2011-03-22 01:59:18 +00:00
|
|
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
|
|
|
@@project_dir = File.dirname($LOAD_PATH.last)
|
|
|
|
end
|
2008-10-19 15:59:35 +00:00
|
|
|
|
2012-07-12 03:32:28 +00:00
|
|
|
srcdir = File.dirname(src_testdir)
|
|
|
|
default_gems = Dir.glob(srcdir + "/{lib,ext}/**/*.gemspec").map {|path| File.basename(path, ".*")}
|
|
|
|
File.foreach(srcdir + "/defs/default_gems") do |line|
|
|
|
|
next if /^\s*#/ =~ line
|
|
|
|
default_gems << line[/^\S+/]
|
|
|
|
end
|
|
|
|
default_gems |= (ENV["GEM_SKIP"] || '').split(/:/)
|
|
|
|
ENV["GEM_SKIP"] = default_gems.join(':')
|
2012-08-03 08:21:55 +00:00
|
|
|
ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
|
2012-07-12 03:32:28 +00:00
|
|
|
|
2010-10-29 14:35:53 +00:00
|
|
|
require_relative 'profile_test_all' if ENV['RUBY_TEST_ALL_PROFILE'] == 'true'
|
|
|
|
|
2011-02-11 12:41:58 +00:00
|
|
|
exit Test::Unit::AutoRunner.run(true, src_testdir)
|