diff --git a/rubygem-timecop.spec b/rubygem-timecop.spec index acf9303..a4d026c 100644 --- a/rubygem-timecop.spec +++ b/rubygem-timecop.spec @@ -1,5 +1,7 @@ %global gem_name timecop +%bcond_with check + Summary: Provides a unified method to mock Time.now, Date.today in a single call Name: rubygem-%{gem_name} Version: 0.9.2 @@ -8,9 +10,11 @@ License: MIT URL: https://github.com/travisjeffery/timecop Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem BuildRequires: rubygems-devel +%if %{with check} BuildRequires: rubygem(activesupport) BuildRequires: rubygem(minitest) BuildRequires: rubygem(mocha) +%endif BuildArch: noarch %description @@ -36,6 +40,7 @@ gem build ../%{gem_name}-%{version}.gemspec mkdir -p %{buildroot}%{gem_dir} cp -va ./%{gem_dir}/* %{buildroot}%{gem_dir} +%if %{with check} %check pushd .%{gem_instdir}/ # Drop Bundler and minitest-rg dependency. @@ -51,6 +56,7 @@ mv test/timecop_without_date_test.rb{,.disabled} ruby -I.:lib -e 'Dir.glob "test/**/*_test.rb", &method(:require)' popd +%endif %files %dir %{gem_instdir}