[DRE-commits] [nanoc] 07/21: rely on gem2deb rake tasks to run tests
Cédric Boutillier
boutil at moszumanska.debian.org
Thu Jan 5 14:04:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository nanoc.
commit 407b28d41e758d49b49888608c0e5d08712e625e
Author: Cédric Boutillier <boutil at debian.org>
Date: Wed Dec 28 23:02:48 2016 +0100
rely on gem2deb rake tasks to run tests
---
debian/ruby-tests.rake | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
index aa1a269..b018132 100644
--- a/debian/ruby-tests.rake
+++ b/debian/ruby-tests.rake
@@ -1,18 +1,16 @@
-require "rake/testtask"
+require 'gem2deb/rake/spectask'
+require 'gem2deb/rake/testtask'
-#SUBDIRS = %w( * base cli data_sources extra filters helpers ).freeze
-SUBDIRS = %w(base cli data_sources filters helpers ).freeze
-
-namespace :test do
- SUBDIRS.each do |dir|
- Rake::TestTask.new(dir == '*' ? 'all' : dir) do |t|
- t.test_files = Dir["test/#{dir}/**/*_spec.rb"] + Dir["test/#{dir}/**/test_*.rb"]
- t.ruby_opts = ['-r./test/helper']
- end
- end
+Gem2Deb::Rake::TestTask.new(:test_all) do |t|
+ t.libs = ['test']
+ t.test_files = FileList['test/**/*_spec.rb'] + FileList['test/**/test_*.rb']
end
+Gem2Deb::Rake::RSpecTask.new(:spec) do |spec|
+ spec.pattern = './spec/**/*_spec.rb'
+end
+
-task default: SUBDIRS.map {|x| "test:#{x}".to_sym}
+task default: [:test_all, :spec]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/nanoc.git
More information about the Pkg-ruby-extras-commits
mailing list