SPECS: perl-Test-MockObject.spec (NEW) - initial revision

migo migo at pld-linux.org
Mon Nov 7 15:21:44 CET 2005


Author: migo                         Date: Mon Nov  7 14:21:44 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
SPECS:
   perl-Test-MockObject.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/perl-Test-MockObject.spec
diff -u /dev/null SPECS/perl-Test-MockObject.spec:1.1
--- /dev/null	Mon Nov  7 15:21:44 2005
+++ SPECS/perl-Test-MockObject.spec	Mon Nov  7 15:21:38 2005
@@ -0,0 +1,80 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%include	/usr/lib/rpm/macros.perl
+%define	pdir	Test
+%define	pnam	MockObject
+Summary:	Test::MockObject - Perl extension for emulating troublesome interfaces
+#Summary(pl):	
+Name:		perl-Test-MockObject
+Version:	1.01
+Release:	1
+# same as perl
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	b056d6cc9c287285c1e5b04b04384178
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires:	perl-UNIVERSAL-can >= 1.00
+BuildRequires:	perl-UNIVERSAL-isa >= 0.02
+BuildRequires:	perl-Test-Exception
+BuildRequires:	perl-Test-Warn
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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.
+
+# %description -l pl
+# TODO
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Build.PL \
+	destdir=$RPM_BUILD_ROOT \
+	installdirs=vendor
+./Build
+
+%{?with_tests:./Build test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+./Build install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}/Test/*.pm
+%{perl_vendorlib}/Test/MockObject
+%{_mandir}/man3/*
+
+%define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2005/11/07 14:21:38  migo
+- initial revision
+
================================================================



More information about the pld-cvs-commit mailing list