File perl-Test-MockModule.spec of Package perl-Test-MockModule (Revision 87ba02e662e442d1cb1868943dc8a393)
Currently displaying revision 87ba02e662e442d1cb1868943dc8a393 , Show latest
110
1
#
2
# spec file for package perl-Test-MockModule
3
#
4
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
Name: perl-Test-MockModule
20
Version: 0.13
21
Release: 1.17
22
#Upstream: GPL-1.0+
23
%define cpan_name Test-MockModule
24
Summary: Override subroutines in a module for unit testing
25
License: GPL-3.0+
26
Group: Development/Libraries/Perl
27
Url: http://search.cpan.org/dist/Test-MockModule/
28
Source0: https://cpan.metacpan.org/authors/id/G/GF/GFRANKS/%{cpan_name}-%{version}.tar.gz
29
Source1: cpanspec.yml
30
BuildArch: noarch
31
BuildRoot: %{_tmppath}/%{name}-%{version}-build
32
BuildRequires: perl
33
BuildRequires: perl-macros
34
BuildRequires: perl(Module::Build) >= 0.380000
35
BuildRequires: perl(SUPER)
36
BuildRequires: perl(Test::More) >= 0.88
37
Requires: perl(SUPER)
38
%{perl_requires}
39
40
%description
41
'Test::MockModule' lets you temporarily redefine subroutines in other
42
packages for the purposes of unit testing.
43
44
A 'Test::MockModule' object is set up to mock subroutines for a given
45
module. The object remembers the original subroutine so it can be easily
46
restored. This happens automatically when all MockModule objects for the
47
given module go out of scope, or when you 'unmock()' the subroutine.
48
49
%prep
50
%setup -q -n %{cpan_name}-%{version}
51
52
%build
53
%{__perl} Build.PL installdirs=vendor
54
./Build build flags=%{?_smp_mflags}
55
56
%check
57
./Build test
58
59
%install
60
./Build install destdir=%{buildroot} create_packlist=0
61
%perl_gen_filelist
62
63
%files -f %{name}.files
64
%defattr(-,root,root,755)
65
%doc Changes README.md
66
%license LICENSE
67
68
%changelog
69
* Fri Oct 6 2017 coolo@suse.com
70
- updated to 0.13
71
see /usr/share/doc/packages/perl-Test-MockModule/Changes
72
v0.13
73
- Added the `redefine()` function. It works just like `mock()`, except if the
74
method being mocked doesn't exist, it causes a panic. Many thanks to Felipe
75
Gasper for this feature!
76
* Thu Jul 13 2017 coolo@suse.com
77
- updated to 0.12
78
see /usr/share/doc/packages/perl-Test-MockModule/Changes
79
v0.12
80
- Added the `noop()` function to make mocking noops easier. Thanks for the PR,
81
Ali Zia!
82
v0.11 2016-10-27
83
- Various housekeeping, testing and minor fixes, courtesy of Paul Cochrane, thanks!
84
* Wed Oct 28 2015 coolo@suse.com
85
- updated to 0.11
86
see /usr/share/doc/packages/perl-Test-MockModule/Changes
87
* Sun Jun 7 2015 coolo@suse.com
88
- updated to 0.10
89
see /usr/share/doc/packages/perl-Test-MockModule/Changes
90
* Thu Apr 16 2015 coolo@suse.com
91
- set license to GPL-3.0+
92
* Mon Apr 13 2015 coolo@suse.com
93
- updated to 0.09
94
see /usr/share/doc/packages/perl-Test-MockModule/Changes
95
v0.08 2015-03-15
96
- Ensure LICENSE autogenerates for distribution, fixed license issues in Build.PL
97
v0.08 2015-03-14
98
- Updated README with correct instructions now that we use Build.PL
99
v0.07 2015-03-14
100
- Updated docs for more clarity when handling objects of mocked classes.
101
v0.06 2015-03-07
102
- unmock() on inherited subroutines will dispatch to the parent module,
103
rather than replace the local subroutine with the parent's subroutine
104
from the time of mocking (RT77439)
105
* Thu Feb 12 2015 coolo@suse.com
106
- fix license
107
* Thu Apr 21 2011 coolo@opensuse.org
108
- initial package 0.05
109
* created by cpanspec 1.78.04
110