3 %bcond_with tests # build without tests
5 %define pkgname minitest
6 Summary: Small and fast replacement for ruby's huge and slow test/unit
10 License: MIT/Ruby License
11 Group: Development/Languages
12 Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
13 # Source0-md5: be309582bddb3eb5be9d4fe34bb63a0f
14 URL: http://rubyforge.org/projects/bfts
15 BuildRequires: rpm-rubyprov
16 BuildRequires: rpmbuild(macros) >= 1.656
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 minitest/unit is a small and fast replacement for ruby's huge and slow
22 test/unit. This is meant to be clean and easy to use both as a regular
23 test writer and for language implementors that need a minimal set of
24 methods to bootstrap a working unit test suite. mini/spec is a
25 functionally complete spec engine. mini/mock, by Steven Baker, is a
26 beautifully tiny mock object framework. (This package was called
27 miniunit once upon a time)
30 Summary: Documentation files for %{pkgname}
32 Requires: ruby >= 1:1.8.7-4
35 Documentation files for %{pkgname}.
38 %setup -q -n %{pkgname}-%{version}
40 find lib -type f | xargs sed -i -e '/^#!\/usr\/bin\/ruby.*/d'
47 # spec test suite is unstable.
48 # https://github.com/seattlerb/minitest/issues/257
49 mv test/minitest/test_minitest_spec.rb{,.ignore}
51 for f in test/minitest/test_*.rb; do
52 ruby -Ilib:.:./test $f
58 rm -rf ri/{PrideIO,ParallelEach,PrideLOL,Kernel,MockExpectationError,Module,Object,Test}
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
65 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
66 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
67 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
70 install -d $RPM_BUILD_ROOT%{ruby_specdir}
71 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
78 %doc History.txt README.txt
79 %dir %{ruby_vendorlibdir}/hoe
80 %{ruby_vendorlibdir}/hoe/minitest.rb
81 %{ruby_vendorlibdir}/minitest
82 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
85 %defattr(644,root,root,755)
86 %{ruby_rdocdir}/%{name}-%{version}
87 %{ruby_ridir}/MiniTest
88 %{ruby_ridir}/Minitest