File perl-Test-Directory.spec of Package perl-Test-Directory
#
# spec file for package perl-Test-Directory
#
# Copyright (c) 2018 SUSE LINUX 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 https://bugs.opensuse.org/
#
Name: perl-Test-Directory
Version: 0.041
Release: 0
%define cpan_name Test-Directory
Summary: Perl extension for maintaining test directories
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/SA/SANBEG/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::Exception)
%{perl_requires}
%description
Sometimes, testing code involves making sure that files are created and
deleted as expected. This module simplifies maintaining test directories by
tracking their status as they are modified or tested with this API, making
it simple to test both individual files, as well as to verify that there
are no missing or unknown files.
Test::Directory implements an object-oriented interface for managing test
directories. It tracks which files it knows about (by creating or testing
them via its API), and can report if any files were missing or unexpectedly
added.
There are two flavors of methods for interacting with the directory.
_Utility_ methods simply return a value (i.e. the number of files/errors)
with no output, while the _Test_ functions use Test::Builder to produce the
approriate test results and diagnostics for the test harness.
The directory will be automatically cleaned up when the object goes out of
scope; see the _clean_ method below for details.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog