1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
$LOAD_PATH << File.expand_path("lib/")
$LOAD_PATH << File.expand_path("test/")
EXPANDED_LOAD_PATH=$LOAD_PATH.map { |d| File.expand_path d }
EXCLUDED_TESTS = Dir["test/gsl/nmatrix_tests/*.rb"]
oldpath = Dir.getwd
(Dir["test/**/*.rb"] - EXCLUDED_TESTS).each do |f|
puts "*** running #{f} ***"
dir, filename = File.split f
begin
Dir.chdir File.expand_path(dir)
system("#{ENV['RUBY_TEST_BIN']} -I#{EXPANDED_LOAD_PATH.join(":")} #{filename}") || exit($?.exitstatus)
ensure
Dir.chdir oldpath
end
end
|