2011-04-21 10:38:57 +00:00
|
|
|
#
|
2015-02-12 08:37:21 +00:00
|
|
|
# spec file for package perl-Test-MockModule
|
2011-04-21 10:38:57 +00:00
|
|
|
#
|
2025-07-12 16:26:48 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2011-04-21 10:38:57 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-28 06:33:46 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-04-21 10:38:57 +00:00
|
|
|
#
|
|
|
|
|
2015-02-12 08:37:21 +00:00
|
|
|
|
2021-01-06 11:00:01 +00:00
|
|
|
%define cpan_name Test-MockModule
|
2011-04-21 10:38:57 +00:00
|
|
|
Name: perl-Test-MockModule
|
2025-07-12 16:26:48 +00:00
|
|
|
Version: 0.180.0
|
2015-02-12 08:37:21 +00:00
|
|
|
Release: 0
|
2025-07-12 16:26:48 +00:00
|
|
|
# v0.180.0 -> normalize -> 0.180.0
|
|
|
|
%define cpan_version v0.180.0
|
2019-10-23 09:56:19 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2024-05-16 12:01:38 +00:00
|
|
|
Summary: Override subroutines in a module for unit testing
|
2020-06-16 13:15:14 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2024-12-31 00:19:35 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/G/GF/GFRANKS/%{cpan_name}-%{cpan_version}.tar.gz
|
2015-04-16 18:24:00 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:17:48 +02:00
|
|
|
Source100: README.md
|
2011-04-21 10:38:57 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2025-07-12 16:26:48 +00:00
|
|
|
BuildRequires: perl(Module::Build) >= 0.423.400
|
|
|
|
BuildRequires: perl(SUPER) >= 1.200
|
2017-07-15 05:00:12 +00:00
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2018-05-18 18:19:23 +00:00
|
|
|
BuildRequires: perl(Test::Warnings)
|
2025-07-12 16:26:48 +00:00
|
|
|
Requires: perl(SUPER) >= 1.200
|
2011-04-21 10:38:57 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
'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 be easily
|
|
|
|
restored. This happens automatically when all MockModule objects for the
|
|
|
|
given module go out of scope, or when you 'unmock()' the subroutine.
|
|
|
|
|
|
|
|
%prep
|
2025-07-12 16:26:48 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
2011-04-21 10:38:57 +00:00
|
|
|
|
|
|
|
%build
|
2024-05-16 12:01:38 +00:00
|
|
|
perl Build.PL --installdirs=vendor
|
|
|
|
./Build build --flags=%{?_smp_mflags}
|
2011-04-21 10:38:57 +00:00
|
|
|
|
|
|
|
%check
|
2015-04-14 05:06:00 +00:00
|
|
|
./Build test
|
2011-04-21 10:38:57 +00:00
|
|
|
|
|
|
|
%install
|
2024-05-16 12:01:38 +00:00
|
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
2011-04-21 10:38:57 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2019-10-23 09:56:19 +00:00
|
|
|
%doc Changes README.md
|
2017-07-15 05:00:12 +00:00
|
|
|
%license LICENSE
|
2011-04-21 10:38:57 +00:00
|
|
|
|
|
|
|
%changelog
|