[packages/ruby-rdiscount] run tests (copied from fedora)

glen glen at pld-linux.org
Sat Oct 17 13:38:17 CEST 2015


commit efa9f70b74b9029155103569416b53f27af1c5eb
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Oct 17 14:38:12 2015 +0300

    run tests (copied from fedora)

 ruby-rdiscount.spec | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/ruby-rdiscount.spec b/ruby-rdiscount.spec
index ed5d88f..ff8b5bf 100644
--- a/ruby-rdiscount.spec
+++ b/ruby-rdiscount.spec
@@ -1,8 +1,12 @@
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
 # TODO
 # - rake doc
 #   (in /home/users/z/rpm/BUILD/ruby-discount-1.2.7) hanna --charset utf8 --fmt html --inline-source --line-numbers --main RDiscount --op doc --title 'RDiscount API Documentation' lib/rdiscount.rb lib/markdown.rb sh: hanna: not found
 #   rake aborted!
-#
+
 %define pkgname rdiscount
 Summary:	Discount Markdown Processor for Ruby
 Name:		ruby-%{pkgname}
@@ -81,6 +85,11 @@ cp %{_datadir}/setup.rb .
 
 %{__ruby} setup.rb setup
 
+%if %{with tests}
+%{__ruby} -r rubygems -Ilib:ext:. \
+	-e 'gem "test-unit"; Dir.glob("test/*_test.rb").sort.each {|f| require f}'
+%endif
+
 rdoc --ri --op ri lib
 rdoc --op rdoc lib
 rm -r ri/Object
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-rdiscount.git/commitdiff/efa9f70b74b9029155103569416b53f27af1c5eb



More information about the pld-cvs-commit mailing list