|
|
|
@ -7,12 +7,13 @@
|
|
|
|
|
|
|
|
|
|
Name: perl-Test-MockModule
|
|
|
|
|
Version: 0.170.0
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: Override subroutines in a module for unit testing
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
URL: https://metacpan.org/release/Test-MockModule
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/G/GF/GFRANKS/Test-MockModule-v%{version}.tar.gz
|
|
|
|
|
Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-MockModule-v%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Build:
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
@ -26,39 +27,54 @@ BuildRequires: perl(SUPER)
|
|
|
|
|
BuildRequires: perl(vars)
|
|
|
|
|
# Tests:
|
|
|
|
|
BuildRequires: perl(lib)
|
|
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
|
BuildRequires: perl(Test::Warnings)
|
|
|
|
|
BuildRequires: perl(parent)
|
|
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
|
|
|
BuildRequires: perl(Test::Warnings)
|
|
|
|
|
%if %{with perl_Test_MockModule_enables_optional_test}
|
|
|
|
|
# Optional tests:
|
|
|
|
|
BuildRequires: perl(Test::Pod) >= 1.00
|
|
|
|
|
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
|
|
|
|
%endif
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
|
|
# Dependencies:
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{summary}.
|
|
|
|
|
Test::MockModule lets you temporarily redefine subroutines in other packages
|
|
|
|
|
for the purposes of unit testing.
|
|
|
|
|
|
|
|
|
|
A Test::MockModule object is set up to mock subroutines for a given module. The
|
|
|
|
|
object remembers the original subroutine so it can easily be restored. This
|
|
|
|
|
happens automatically when all MockModule objects for the given module go out
|
|
|
|
|
of scope, or when you unmock() the subroutine.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n Test-MockModule-v%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{__perl} Build.PL installdirs=vendor
|
|
|
|
|
perl Build.PL installdirs=vendor
|
|
|
|
|
./Build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
|
|
|
|
chmod -R u+w $RPM_BUILD_ROOT/*
|
|
|
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
|
|
|
|
%{_fixperms} -c %{buildroot}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
./Build test
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc Changes README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{perl_vendorlib}/Test
|
|
|
|
|
%{_mandir}/man3/*.3*
|
|
|
|
|
%doc Changes README.md
|
|
|
|
|
%{perl_vendorlib}/Test/
|
|
|
|
|
%{_mandir}/man3/Test::MockModule.3*
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Oct 8 2019 Paul Howarth <paul@city-fan.org> - 0.170.0-5
|
|
|
|
|
- Spec tidy-up
|
|
|
|
|
- Use author-independent source URL
|
|
|
|
|
- Enhance %%description
|
|
|
|
|
- Fix permissions verbosely
|
|
|
|
|
- Make %%files list more explicit
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.170.0-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|