2004-11-20 08:58:20 -05:00
|
|
|
require 'rbconfig'
|
2008-10-15 00:16:28 -04:00
|
|
|
|
2008-10-16 09:55:09 -04:00
|
|
|
require 'test/unit'
|
2008-10-19 11:59:35 -04:00
|
|
|
|
2012-06-08 03:19:38 -04:00
|
|
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
2011-03-09 17:32:29 -05:00
|
|
|
$LOAD_PATH << src_testdir
|
2011-07-08 19:39:42 -04:00
|
|
|
module Gem
|
|
|
|
end
|
2011-03-21 21:59:18 -04:00
|
|
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
|
|
|
@@project_dir = File.dirname($LOAD_PATH.last)
|
|
|
|
end
|
2008-10-19 11:59:35 -04:00
|
|
|
|
2012-07-11 23:32:28 -04: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(':')
|
|
|
|
|
2010-10-29 10:35:53 -04:00
|
|
|
require_relative 'profile_test_all' if ENV['RUBY_TEST_ALL_PROFILE'] == 'true'
|
|
|
|
|
2011-02-11 07:41:58 -05:00
|
|
|
exit Test::Unit::AutoRunner.run(true, src_testdir)
|