[DRE-commits] [ruby-sinatra] 07/09: Use rake to run the test suite

Jérémy Bobbio lunar at alioth.debian.org
Wed Aug 7 14:14:51 UTC 2013


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-sinatra.

commit d9bbfe33356dfd2054749d67cf7d556c4ffa39e6
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Wed Aug 7 15:54:46 2013 +0200

    Use rake to run the test suite
    
    This more closely match upstream behaviour and thus prevents false negative
    results to show up.
---
 debian/ruby-tests.rake |   14 ++++++++++++++
 debian/ruby-tests.rb   |    2 --
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 100644
index 0000000..72512cd
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1,14 @@
+require 'rake/testtask'
+
+task :default => :test
+
+task :test do
+  ENV['LANG'] = 'C'
+  ENV.delete 'LC_CTYPE'
+end
+
+Rake::TestTask.new(:test) do |t|
+  t.test_files = FileList['test/*_test.rb']
+  t.ruby_opts = ['-rubygems'] if defined? Gem
+  t.ruby_opts << '-I.'
+end
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
deleted file mode 100644
index b2a0157..0000000
--- a/debian/ruby-tests.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-$: << 'lib' << 'test' << '.'
-Dir['test/**/*_test.rb'].each { |f| require f }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-sinatra.git



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