[rubygem-parseconfig] fix tests

derks derks at fedoraproject.org
Tue Jun 12 23:26:55 UTC 2012


commit ddd738e1c8e0ea659ced52b2e4bf85ffc783bf85
Author: BJ Dierkes <wdierkes at rackspace.com>
Date:   Tue Jun 12 03:41:57 2012 -0500

    fix tests

 .gitignore               |    1 +
 rubygem-parseconfig.spec |   16 +++++++++++++++-
 sources                  |    2 +-
 3 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5ca00d2..fe97599 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 parseconfig-0.5.2.gem
 /parseconfig-1.0.2.gem
+/rubygem-parseconfig-1.0.2-tests.tgz
diff --git a/rubygem-parseconfig.spec b/rubygem-parseconfig.spec
index 36a4b12..d9a438f 100644
--- a/rubygem-parseconfig.spec
+++ b/rubygem-parseconfig.spec
@@ -8,6 +8,16 @@ Group:          Development/Languages
 License:        MIT 
 URL:            http://github.com/derks/ruby-parseconfig
 Source0:        http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+
+# For testing - per http://fedoraproject.org/wiki/Packaging:Ruby#Test_suites_not_included_in_the_package
+#
+# 	$ git clone git at github.com:derks/ruby-parseconfig.git
+#	$ cd ruby-parseconfig
+# 	$ git checkout 1.0.2
+#	$ tar -czf rubygem-parseconfig-1.0.2-tests.tgz tests/
+#
+Source1:	%{gem_name}-%{version}-tests.tgz
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: 	ruby(rubygems), ruby(abi) >= 1.8.6
 BuildRequires: 	rubygems-devel, rubygem-rspec
@@ -20,6 +30,8 @@ ParseConfig provides simple parsing of standard configuration files in the
 form of 'param = value'.  It also supports nested [group] sections.
 
 %prep 
+%setup -q -D -T -n %{gem_name}-%{version}
+tar -xzf %{SOURCE1}
 
 %build
 # pass, nothing to do
@@ -30,7 +42,9 @@ mkdir -p %{buildroot}%{gem_dir}
 gem install --local --install-dir %{buildroot}%{gem_dir} --force %{SOURCE0}
 
 %check
-bash utils/run-tests.sh
+pushd tests
+    rspec test_parseconfig.rb
+popd
 
 %clean
 rm -rf %{buildroot}
diff --git a/sources b/sources
index e187d10..73f1211 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-58dac67900241ae0760666237dc2386c  parseconfig-1.0.2.gem
+75e6f490e1653fcb27689f0331b7e39d  rubygem-parseconfig-1.0.2-tests.tgz


More information about the scm-commits mailing list