#
# spec file for package perl-Test-Most
#
# Copyright (c) 2022 SUSE LLC
#
# 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/
#


%define cpan_name Test-Most
Name:           perl-Test-Most
Version:        0.38
Release:        1.5
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Most commonly needed test functions and features
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/O/OV/OVID/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Exception::Class) >= 1.14
BuildRequires:  perl(Test::Deep) >= 0.119
BuildRequires:  perl(Test::Differences) >= 0.64
BuildRequires:  perl(Test::Exception) >= 0.430000
BuildRequires:  perl(Test::Harness) >= 3.35
BuildRequires:  perl(Test::More) >= 1.302047
BuildRequires:  perl(Test::Warn) >= 0.30
Requires:       perl(Exception::Class) >= 1.14
Requires:       perl(Test::Deep) >= 0.119
Requires:       perl(Test::Differences) >= 0.64
Requires:       perl(Test::Exception) >= 0.430000
Requires:       perl(Test::Harness) >= 3.35
Requires:       perl(Test::More) >= 1.302047
Requires:       perl(Test::Warn) >= 0.30
%{perl_requires}

%description
Test::Most exists to reduce boilerplate and to make your testing life
easier. We provide "one stop shopping" for most commonly used testing
modules. In fact, we often require the latest versions so that you get bug
fixes through Test::Most and don't have to keep upgrading these modules
separately.

This module provides you with the most commonly used testing functions,
along with automatically turning on strict and warning and gives you a bit
more fine-grained control over your test suite.

    use Test::Most tests => 4, 'die';

    ok 1, 'Normal calls to ok() should succeed';
    is 2, 2, '... as should all passing tests';
    eq_or_diff [3], [4], '... but failing tests should die';
    ok 4, '... will never get to here';

As you can see, the 'eq_or_diff' test will fail. Because 'die' is in the
import list, the test program will halt at that point.

If you do not want strict and warnings enabled, you must explicitly disable
them. Thus, you must be explicit about what you want and no longer need to
worry about accidentally forgetting them.

    use Test::Most tests => 4;
    no strict;
    no warnings;

%prep
%autosetup  -n %{cpan_name}-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%check
make test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%doc Changes README

%changelog
* Sun Sep 25 2022 Tina Müller <timueller+perl@suse.de>
- updated to 0.38
  see /usr/share/doc/packages/perl-Test-Most/Changes
  0.38    2022-09-24
  - Stop permanently altering Test::More's export list (RT#73299)
    (thanks to 2shortplanks for this)
* Sun Apr  5 2020 <timueller+perl@suse.de>
- updated to 0.37
  see /usr/share/doc/packages/perl-Test-Most/Changes
  0.37    2020-04-04
  - Don't call parent DESTROY method if it does not exist (thanks,
    Karen)
  0.36    2020-04-04
  - Ensure Test::Builder's original DESTROY is called. Thanks to Karen
    Etheridge. https://github.com/Ovid/test--most/pull/10
* Wed Jan 11 2017 coolo@suse.com
- updated to 0.35
  see /usr/share/doc/packages/perl-Test-Most/Changes
  0.35    2016-08-11
  - Bump module deps due to Test2. Test2 is tested well enough that
    you're probably OK, but you'll want to retest your code with this
    release.
* Mon Apr 13 2015 coolo@suse.com
- updated to 0.34
  see /usr/share/doc/packages/perl-Test-Most/Changes
  0.34    2014-08-03
  - Make compatible with the new Test::Builder (exodist - Chad Granum)
  - Backwards-incompatible change: reftype no longer exported by
    default. See https://github.com/Ovid/test--most/issues/6 (reported
    by rjattril). This should not be noticed by most users
    (crosses-fingers).
  - defer_plan() has long been deprecated and will be removed in a
    future release. This release carp()s if you try to call it.
* Sat Mar 22 2014 coolo@suse.com
- updated to 0.33
  - Fixed "(in cleanup) Can't use an undefined value as a subroutine
    reference" error.
  - Remove Build.PL.
* Tue Jun  4 2013 coolo@suse.com
- updated to 0.31
  - Fix "You tried to plan twice" bug (reported on #78564)
  - Bugfix: Moose can now be used safely as we exclude
    Test::Deep::blessed by default (multiple reports)
  - Bugfix from Randy Stauner. Time::HiRes eval test uses $@, not @_
  - carp instead of warn (Olivier Mengué)
  - Remove autogenerated files (Olivier Mengué)
* Tue Dec 27 2011 coolo@suse.com
- update to 0.25
  - Add timeit() function to time individual behaviours.
  - Update dependencies to pick up multiple bug fixes, new behaviours,
    in various Test:: libraries.
  - added "Excluding Test Symbols" feature (RT#61146, Karen Etheridge).
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Mon Nov 29 2010 coolo@novell.com
- remove /var/adm/perl-modules
* Sun Aug 22 2010 pascal.bleser@opensuse.org
- initial package (0.22)