|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
|
|
|
|
%global fullver %{majorver}%{?preminorver}
|
|
|
|
|
|
|
|
|
|
%global fedorarel 3
|
|
|
|
|
%global fedorarel 7
|
|
|
|
|
|
|
|
|
|
%global gem_name rspec-core
|
|
|
|
|
|
|
|
|
@ -13,12 +13,14 @@
|
|
|
|
|
# pulled by aruba
|
|
|
|
|
%global need_bootstrap_set 0
|
|
|
|
|
|
|
|
|
|
%undefine __brp_mangle_shebangs
|
|
|
|
|
# Disable Aruba support due to excesive dependency chain. This also disables
|
|
|
|
|
# Cucumber integration test suite, which depends on Aruba as well.
|
|
|
|
|
%bcond_with aruba
|
|
|
|
|
|
|
|
|
|
Summary: RSpec runner and formatters
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: %{majorver}
|
|
|
|
|
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}
|
|
|
|
|
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}.1
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rspec/rspec-mocks
|
|
|
|
@ -26,24 +28,28 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
|
|
|
|
# %%{SOURCE2} %%{name} %%{version}
|
|
|
|
|
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
|
|
|
|
Source2: rspec-related-create-full-tarball.sh
|
|
|
|
|
# Adjust backtrace filter for Fedora placement of StdLib.
|
|
|
|
|
# https://github.com/rspec/rspec-core/pull/2881
|
|
|
|
|
Patch0: rubygem-rspec-core-3.10.1-Filter-content-of-usr-share-ruby.patch
|
|
|
|
|
|
|
|
|
|
#BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
%if 0%{?need_bootstrap_set} < 1
|
|
|
|
|
BuildRequires: rubygem(minitest)
|
|
|
|
|
BuildRequires: rubygem(nokogiri)
|
|
|
|
|
BuildRequires: rubygem(rake)
|
|
|
|
|
%{?with_aruba:BuildRequires: rubygem(minitest)}
|
|
|
|
|
BuildRequires: rubygem(rake)
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
BuildRequires: rubygem(aruba)
|
|
|
|
|
%if %{with aruba}
|
|
|
|
|
BuildRequires: rubygem(aruba)
|
|
|
|
|
# Newly
|
|
|
|
|
BuildRequires: rubygem(flexmock)
|
|
|
|
|
BuildRequires: rubygem(mocha)
|
|
|
|
|
BuildRequires: rubygem(rr)
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: rubygem(coderay)
|
|
|
|
|
BuildRequires: rubygem(thread_order)
|
|
|
|
|
BuildRequires: git
|
|
|
|
|
# New test
|
|
|
|
|
BuildRequires: rubygem(cucumber)
|
|
|
|
|
%{?with_aruba:BuildRequires: rubygem(cucumber)}
|
|
|
|
|
BuildRequires: rubygem(test-unit)
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
|
@ -74,7 +80,7 @@ This package contains documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -T -n %{gem_name}-%{version} -b 1
|
|
|
|
|
#%%patch1 -p1
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
@ -91,64 +97,29 @@ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
|
|
|
|
|
%if 0%{?need_bootstrap_set} < 1
|
|
|
|
|
%check
|
|
|
|
|
LANG=C.UTF-8
|
|
|
|
|
# Test failure needs investigation...
|
|
|
|
|
# perhaps due to some incompatibility between libxml2 2.9.x
|
|
|
|
|
# and rubygem-nokogiri
|
|
|
|
|
|
|
|
|
|
FAILFILE=()
|
|
|
|
|
FAILTEST=()
|
|
|
|
|
FAILFILE+=("spec/rspec/core/formatters/progress_formatter_spec.rb")
|
|
|
|
|
FAILTEST+=("produces the expected full output")
|
|
|
|
|
FAILFILE+=("spec/rspec/core/formatters/documentation_formatter_spec.rb")
|
|
|
|
|
FAILTEST+=("produces the expected full output")
|
|
|
|
|
#FAILFILE+=("spec/rspec/core/formatters/syntax_highlighter_spec.rb")
|
|
|
|
|
#FAILTEST+=("when CodeRay is available")
|
|
|
|
|
# New from 3.5.3
|
|
|
|
|
FAILFILE+=("spec/integration/suite_hooks_errors_spec.rb")
|
|
|
|
|
FAILTEST+=("nicely formats errors")
|
|
|
|
|
# New from 3.6.0
|
|
|
|
|
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
|
|
|
|
|
FAILTEST+=("nicely handles load-time errors")
|
|
|
|
|
# NET??
|
|
|
|
|
FAILFILE+=("spec/rspec/core/runner_spec.rb")
|
|
|
|
|
FAILTEST+=("if drb server is started with 127.0.0.1")
|
|
|
|
|
FAILFILE+=("spec/rspec/core/runner_spec.rb")
|
|
|
|
|
FAILTEST+=("if drb server is started with localhost")
|
|
|
|
|
# New from 3.9.0
|
|
|
|
|
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
|
|
|
|
|
FAILTEST+=("prints a single error when it happens")
|
|
|
|
|
%if ! %{with aruba}
|
|
|
|
|
# Avoid dependency on Aruba. The files needs to be present, since they are
|
|
|
|
|
# listed by `git ls-files` from 'library wide checks' shared example.
|
|
|
|
|
truncate -s 0 spec/support/aruba_support.rb
|
|
|
|
|
find spec/integration -exec truncate -s 0 {} \;
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
for ((i = 0; i < ${#FAILFILE[@]}; i++)) {
|
|
|
|
|
sed -i \
|
|
|
|
|
-e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \
|
|
|
|
|
${FAILFILE[$i]}
|
|
|
|
|
}
|
|
|
|
|
# Adjust the backtrace filters to our directory layout.
|
|
|
|
|
sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \
|
|
|
|
|
spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb
|
|
|
|
|
|
|
|
|
|
ruby -rrubygems -Ilib/ -S exe/rspec
|
|
|
|
|
|
|
|
|
|
# Well, when HOME variable is not set and tty is not a real one
|
|
|
|
|
# but pseudo-tty, with current ruby implementation $ env -i ruby -e 'p Dir.home'
|
|
|
|
|
# causes:
|
|
|
|
|
# `home': couldn't find login name -- expanding `~' (ArgumentError)
|
|
|
|
|
# - and this causes some test errors on rspec-core.
|
|
|
|
|
# fixing this error without modifying rspec-core "code" is very hard,
|
|
|
|
|
# once modifying source itself.
|
|
|
|
|
sed -i.warn lib/rspec/core/configuration_options.rb \
|
|
|
|
|
-e '\@because the HOME environment variable is not set@s|RSpec\.warning|#RSpec.warning|'
|
|
|
|
|
|
|
|
|
|
ruby -rrubygems -Ilib/ -S exe/rspec || \
|
|
|
|
|
ruby -rrubygems -Ilib/ -S exe/rspec --tag ~broken
|
|
|
|
|
|
|
|
|
|
%if %{with aruba}
|
|
|
|
|
# Mark failing test as broken
|
|
|
|
|
sed -i features/core_standalone.feature \
|
|
|
|
|
-e 's|@unsupported-on-rbx|@unsupported-on-rbx @broken|'
|
|
|
|
|
sed -i features/command_line/init.feature \
|
|
|
|
|
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
|
|
|
|
|
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
|
|
|
|
|
|
|
|
|
|
# From ruby 3, once disabling
|
|
|
|
|
# disabling tests failing with rr 1.2.1
|
|
|
|
|
%if 0%{?fedora} >= 34
|
|
|
|
|
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
|
|
|
|
|
for f in \
|
|
|
|
|
features/command_line/warnings_option.feature \
|
|
|
|
|
`# disabling tests failing with rr 1.2.1` \
|
|
|
|
|
`# https://github.com/rspec/rspec-core/issues/2882` \
|
|
|
|
|
features/mock_framework_integration/use_rr.feature \
|
|
|
|
|
%{nil}
|
|
|
|
|
do
|
|
|
|
@ -156,24 +127,27 @@ do
|
|
|
|
|
done
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# skip-when-diff-lcs-1.3 tests are introduced on 3.9.3
|
|
|
|
|
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ || \
|
|
|
|
|
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ \
|
|
|
|
|
# Setup just right amount of paths to make the tests suite run.
|
|
|
|
|
export RUBYOPT="-I$(pwd)/lib:$(ruby -e 'puts %w[rspec/support minitest test/unit].map {|r| Gem::Specification.find_by_path(r).full_require_paths}.join(?:)')"
|
|
|
|
|
cucumber -v -f pretty features/ || \
|
|
|
|
|
cucumber -v -f pretty features/ \
|
|
|
|
|
--tag "not @broken" \
|
|
|
|
|
`# Explicitly skip 'skip-when-diff-lcs-1.3' and '@ruby-2-7' test cases. While` \
|
|
|
|
|
`# the conditions are correctly detected, the 'warning' called instead their` \
|
|
|
|
|
`# execution is troublesome, possibly due to upstream using old Cucumber?` \
|
|
|
|
|
--tag "not @skip-when-diff-lcs-1.3" \
|
|
|
|
|
--tag "not @ruby-2-7" \
|
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
mv lib/rspec/core/configuration_options.rb{.warn,}
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 34
|
|
|
|
|
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
|
|
|
|
|
for f in \
|
|
|
|
|
features/command_line/warnings_option.feature \
|
|
|
|
|
features/mock_framework_integration/use_rr.feature \
|
|
|
|
|
%{nil}
|
|
|
|
|
do
|
|
|
|
|
mv ${f}.drop ${f}
|
|
|
|
|
done
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -195,6 +169,28 @@ done
|
|
|
|
|
%{gem_docdir}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-7.1
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Jul 15 2021 Pavel Valena <pvalena@redhat.com> - 3.10.1-7
|
|
|
|
|
- Re-add Requires: rubygem(rake), as it's needed for runtime.
|
|
|
|
|
Resolves: rhbz#1982410
|
|
|
|
|
Resolves: rhbz#1982419
|
|
|
|
|
|
|
|
|
|
* Fri Apr 23 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-6
|
|
|
|
|
- Disable integration test suite to cut down the dependency tree.
|
|
|
|
|
Resolves: rhbz#1952842
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-5.1
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Thu Mar 18 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-5
|
|
|
|
|
- Make test suite green.
|
|
|
|
|
|
|
|
|
|
* Sun Feb 28 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-4
|
|
|
|
|
- Add conditional for eln
|
|
|
|
|
|
|
|
|
|
* Wed Feb 17 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-3
|
|
|
|
|
- rr 1.2.1: Disable failing cucumber suite for now
|
|
|
|
|
|
|
|
|
|