3 %bcond_with tests # run tests
5 # test needs rspec-core, however rspec-core depends on rspec-mocks
6 # runtime part of rspec-mocks does not depend on rspec-core
8 %define pkgname rspec-core
9 Summary: Rspec-2 runner and formatters
10 Summary(pl.UTF-8): Kod uruchomieniowy i formatujący dla Rspec-2
15 Group: Development/Languages
16 Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem
17 # Source0-md5: 70fbddcf0ab469b332a028ccc6565a33
18 URL: http://github.com/rspec/rspec-mocks
19 BuildRequires: rpm-rubyprov
20 BuildRequires: rpmbuild(macros) >= 1.656
22 BuildRequires: ruby-ZenTest
23 BuildRequires: ruby-aruba
24 BuildRequires: ruby-nokogiri
25 BuildRequires: ruby-rake
26 BuildRequires: ruby-rspec-expectations
27 BuildRequires: ruby-rspec-mocks
29 # Make the following installed by default
30 # lib/rspec/core/rake_task
32 Suggests: ruby-ZenTest
35 Suggests: ruby-ruby-debug
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Behaviour Driven Development for Ruby.
42 This package contains the runner and formatters for Rspec-2.
44 %description -l pl.UTF-8
45 Programowanie sterowane zachowaniem (Behaviour Driven Development) dla
48 Ten pakiet zawiera kod uruchomieniowy i formatujący dla Rspec-2.
51 %setup -q -n %{pkgname}-%{version}
54 grep -rl '^#![ \t]*%{_bindir}' ./lib| \
55 xargs sed -i -e '\@^#![ \t]*/usr/bin@d'
62 # Test failure needs investigation...
63 # There are is some missing template for Ruby 2.0.0:
64 # https://github.com/rspec/rspec-core/commits/master/spec/rspec/core/formatters/html_formatted-2.0.0.html
65 ruby -rubygems -Ilib/ -S exe/rspec
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
71 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
72 cp -a exe/* $RPM_BUILD_ROOT%{_bindir}
73 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
75 # Rename autospec to avoid conflict with rspec 1.3
76 # (anyway this script doesn't seem to be useful)
77 %{__mv} $RPM_BUILD_ROOT%{_bindir}/autospec{,2}
80 rm -rf $RPM_BUILD_ROOT
83 %defattr(644,root,root,755)
84 %doc README.md Changelog.md License.txt
85 %attr(755,root,root) %{_bindir}/autospec2
86 %attr(755,root,root) %{_bindir}/rspec
87 %dir %{ruby_vendorlibdir}/autotest
88 %{ruby_vendorlibdir}/autotest/discover.rb
89 %{ruby_vendorlibdir}/autotest/rspec2.rb
90 %dir %{ruby_vendorlibdir}/rspec
91 %{ruby_vendorlibdir}/rspec/autorun.rb
92 %{ruby_vendorlibdir}/rspec/core.rb
93 %{ruby_vendorlibdir}/rspec/core
94 %{ruby_specdir}/%{pkgname}-%{version}.gemspec