8
0
Files
perl-Test-MockObject/perl-Test-MockObject.spec

82 lines
2.6 KiB
RPMSpec
Raw Normal View History

# vim: set sw=4 ts=4 et nu:
#
# spec file for package perl-Test-MockObject
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Test-MockObject
Version: 1.09
Release: 0
Summary: Perl extension for emulating troublesome interfaces
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Source: Test-MockObject-%{version}.tar.gz
Url: http://search.cpan.org/dist/Test-MockObject/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: make
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::Exception)
BuildRequires: perl(UNIVERSAL::can)
BuildRequires: perl(UNIVERSAL::isa)
Requires: perl(UNIVERSAL::can)
Requires: perl(UNIVERSAL::isa)
%description
It's a simple program that doesn't use any other modules, and those are easy to
test. More often, testing a program completely means faking up input to another
module, trying to coax the right output from something you're not supposed to
be testing anyway.
Testing is a lot easier when you can control the entire environment. With
Test::MockObject, you can get a lot closer.
Test::MockObject allows you to create objects that conform to particular
interfaces with very little code. You don't have to reimplement the behavior,
just the input and the output.
%prep
%setup -q -n "Test-MockObject-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}
%install
%perl_make_install
%perl_process_packlist
%check
%__make test
%clean
%__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorlib}/Test
%{perl_vendorlib}/Test/MockObject.pm
%{perl_vendorlib}/Test/MockObject
%dir %{perl_vendorarch}/auto/Test
%{perl_vendorarch}/auto/Test/MockObject
%doc %{perl_man3dir}/Test::MockObject.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/Test::MockObject::*.%{perl_man3ext}%{ext_man}
%changelog