diff --git a/rubygem-i18n.spec b/rubygem-i18n.spec index 0f78bb1..a0e588a 100644 --- a/rubygem-i18n.spec +++ b/rubygem-i18n.spec @@ -1,5 +1,7 @@ %global gem_name i18n +%bcond_without tests + Name: rubygem-%{gem_name} Version: 1.7.0 Release: 1%{?dist} @@ -15,10 +17,13 @@ Source1: %{gem_name}-%{version}-tests.txz BuildRequires: ruby BuildRequires: ruby(release) BuildRequires: rubygems-devel +%if %{with tests} BuildRequires: rubygem(minitest) BuildRequires: rubygem(mocha) BuildRequires: rubygem(test_declarative) BuildRequires: rubygem(concurrent-ruby) +BuildRequires: rubygem(activesupport) +%endif BuildArch: noarch %description @@ -45,6 +50,7 @@ mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ +%if %{with tests} %check pushd .%{gem_instdir} ln -s %{_builddir}/test . @@ -56,6 +62,7 @@ sed -i -e "/require 'bundler\/setup'/ s/^/#/" test/test_helper.rb # https://github.com/svenfuchs/i18n/issues/115 LANG=C.utf8 ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd +%endif %files %dir %{gem_instdir} @@ -67,8 +74,6 @@ popd %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md -%{gem_instdir}/gemfiles -%{gem_instdir}/test %changelog * Wed Oct 16 2019 Pavel Valena - 1.7.0-1