[DRE-commits] [SCM] ruby-test-unit.git branch, master, updated. upstream/2.4.0-8-gbd248a4

Cédric Boutillier cedric.boutillier at gmail.com
Mon Sep 19 20:55:29 UTC 2011


The following commit has been merged in the master branch:
commit f5f1b0f4556881d2bb9548de4a78c06dcd220659
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date:   Mon Sep 19 16:23:30 2011 +0200

    enable test suite

diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index eac5ce6..d091fd8 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -1,13 +1,15 @@
-# FIXME
-# there's a spec/ or a test/ directory in the upstream source, but
-# no test suite was defined in the Gem specification. It would be
-# a good idea to define it here so the package gets tested at build time.
-# Examples:
-# $: << 'lib' << '.'
-# Dir['{spec,test}/**/*.rb'].each { |f| require f }
-#
-# require 'test/ts_foo.rb'
-#
-# require 'rbconfig'
-# ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
-# exec("#{ruby} -I. test/runtests.rb")
+# content inspired by test/run-test.rb
+
+$VERBOSE = true
+
+$KCODE = "utf8" unless "".respond_to?(:encoding)
+
+base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
+lib_dir = File.join(base_dir, "lib")
+test_dir = File.join(base_dir, "test")
+
+$LOAD_PATH.unshift(lib_dir)
+
+require 'test/unit'
+
+exit Test::Unit::AutoRunner.run(true, test_dir)

-- 
ruby-test-unit.git



More information about the Pkg-ruby-extras-commits mailing list