From 49cabb4d953ce69045b0ac4b9a0077aac8486c1a Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 9 Mar 2023 16:20:27 +0900 Subject: [PATCH] refactor: do early exit and avoid looong if conditional --- rubygem-rspec-core.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rubygem-rspec-core.spec b/rubygem-rspec-core.spec index 832a2e8..dcce0c3 100644 --- a/rubygem-rspec-core.spec +++ b/rubygem-rspec-core.spec @@ -102,7 +102,11 @@ cp -a .%{_prefix}/* %{buildroot}%{_prefix}/ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts} %check -%if %{without bootstrap} +%if %{with bootstrap} +# Not do actual check, exiting. +exit 0 +%endif + LANG=C.UTF-8 %if %{without aruba} @@ -129,7 +133,10 @@ sed -i spec/rspec/core/example_spec.rb \ # FIXME seed 33413 sees test failure ruby -Ilib -S exe/rspec --seed 1 #33413 -%if %{with aruba} +%if %{without aruba} +# The following lines are for cucumber tests, so exiting. +exit 0 +%endif # Mark failing test as broken sed -i features/command_line/init.feature \ @@ -178,10 +185,6 @@ do done %endif -%endif - -%endif - %files %dir %{gem_instdir}