]> git.pld-linux.org Git - packages/perl-Test-MockObject.git/blob - perl-Test-MockObject.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Test-MockObject.git] / perl-Test-MockObject.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    Test
6 %define pnam    MockObject
7 Summary:        Test::MockObject - Perl extension for emulating troublesome interfaces
8 Summary(pl.UTF-8):      Test::MockObject - rozszerzenie Perla do emulacji kłopotliwych interfejsów
9 Name:           perl-Test-MockObject
10 Version:        1.09
11 Release:        1
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  3c9c2842d40fa8c389563c227804d7d8
16 URL:            http://search.cpan.org/dist/Test-MockObject/
17 BuildRequires:  perl-Module-Build
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 BuildRequires:  perl-Test-Exception
22 BuildRequires:  perl-Test-Warn
23 BuildRequires:  perl-UNIVERSAL-can >= 1.11
24 BuildRequires:  perl-UNIVERSAL-isa >= 0.06
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 It's a simple program that doesn't use any other modules, and those
31 are easy to test. More often, testing a program completely means
32 faking up input to another module, trying to coax the right output
33 from something you're not supposed to be testing anyway.
34
35 Testing is a lot easier when you can control the entire environment.
36 With Test::MockObject, you can get a lot closer.
37
38 Test::MockObject allows you to create objects that conform to
39 particular interfaces with very little code. You don't have to
40 reimplement the behavior, just the input and the output.
41
42 %description -l pl.UTF-8
43 Jest to prosty program nie używający żadnych innych modułów, a te są
44 łatwe do sprawdzenia. Co więcej, kompletne przetestowanie programu
45 oznacza fałszowanie wejścia do innego modułu, próbując wyłudzić
46 prawdziwe wyjście z czegoś, czego nie powinno się testować.
47
48 Testowanie jest dużo łatwiejsze, jeśli można sterować całym
49 środowiskiem. Przy użyciu Test::MockObject można się do tego zbliżyć.
50
51 Test::MockObject pozwala tworzyć obiekty zgodne z pewnymi interfejsami
52 przy użyciu bardzo małej ilości kodu. Nie trzeba reimplementować
53 zachowania, wystarczy wejście i wyjście.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 %{__perl} Build.PL \
60         destdir=$RPM_BUILD_ROOT \
61         installdirs=vendor
62 ./Build
63
64 %{?with_tests:./Build test}
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 ./Build install
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
75 %defattr(644,root,root,755)
76 %doc Changes README
77 %{perl_vendorlib}/Test/*.pm
78 %{perl_vendorlib}/Test/MockObject
79 %{_mandir}/man3/*
This page took 0.12812 seconds and 4 git commands to generate.