3 %bcond_without tests # do not perform "make test"
7 Summary: Test::Time - Overrides the time() and sleep() core functions for testing
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: 006c4b2134f33d8dc98ecf545d4f8508
16 URL: http://search.cpan.org/dist/Test-Time/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Test::Time can be used to test modules that deal with time. Once you
24 use this module, all references to time and sleep will be
25 internalized. You can set custom time by passing time => number after
28 use Test::Time time => 1;
30 my $now = time; # $now is equal to 1 sleep 300; # returns immediately,
31 displaying a note my $then = time; # $then equals to 301
34 %setup -q -n %{pdir}-%{pnam}-%{version}
37 %{__perl} Makefile.PL \
41 %{?with_tests:%{__make} test}
44 rm -rf $RPM_BUILD_ROOT
46 %{__make} pure_install \
47 DESTDIR=$RPM_BUILD_ROOT
50 rm -rf $RPM_BUILD_ROOT
53 %defattr(644,root,root,755)
55 %{perl_vendorlib}/Test/*.pm