]> git.pld-linux.org Git - packages/ruby-rdiscount.git/blobdiff - ruby-rdiscount.spec
run tests (copied from fedora)
[packages/ruby-rdiscount.git] / ruby-rdiscount.spec
index ed5d88fbf7a7562bef941a9a65f5b2229b9f756e..ff8b5bf7ca98555d074646969d9c1473b46ef09d 100644 (file)
@@ -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
This page took 0.04983 seconds and 4 git commands to generate.