check task for rubygems without bundled test

Vít Ondruch vondruch at redhat.com
Wed Jan 19 15:45:31 UTC 2011


Hello,

Currently I am dealing with several rubygems (arel, regin) that do not 
contain bundled their test suites, although the test suite is usually 
available on GitHub. It would be nice to run the test suite during 
packaging, however I am reluctant to modify the package in that way that 
it will include the test suite.

So here is my proposal:

# Preparation of the test suite
# git clone http://github.com/somerepo/somegem.git
# cd somegem/
# tar czvf somegem-tests.tgz spec/
Source1: some-tests.tgz

%check
mkdir %{_tmppath}/%{gemname}-%{version}
tar xzvf %{SOURCE1} -C %{_tmppath}/%{gemname}-%{version}
pushd %{_tmppath}/%{gemname}-%{version}
ruby -I%{buildroot}%{geminstdir}/lib `which spec` spec
popd
rm -rf %{_tmppath}/%{gemname}-%{version}


What is your opinion?


Vit


More information about the ruby-sig mailing list