%global pkg_name DBD-Mock %global pkg_version 1.36 %global rpm_pkg_version 1.36 %global rpm_pkg_release 1.n0i.2 Summary: Mock database driver for testing Name: perl-%{pkg_name} Version: %{rpm_pkg_version} Release: %{rpm_pkg_release}%{?cpan_version}%{?dist} Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: http://www.cpan.org/authors/id/S/ST/STEVAN/%{pkg_name}-%{pkg_version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: rpm-build-reb00t-perl BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(DBI) >= 1.3 BuildRequires: perl(Test::More) >= 0.47 %description Testing with databases can be tricky. If you are developing a system married to a single database then you can make some assumptions about your environment and ask the user to provide relevant connection information. But if you need to test a framework that uses DBI, particularly a framework that uses different types of persistence schemes, then it may be more useful to simply verify what the framework is trying to do -- ensure the right SQL is generated and that the correct parameters are bound. "DBD::Mock" makes it easy to just modify your configuration (presumably held outside your code) and just use it instead of "DBD::Foo" (like DBD::Pg or DBD::mysql) in your framework. %prep %setup -q -n %{pkg_name}-%{pkg_version} %{fix_mod} %build %{perl_build} %{!?_without_test:%{__make} test} %install %{__rm} -rf $RPM_BUILD_ROOT %{perl_install} %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{perl_files} %doc Changes README %changelog * Sat Oct 20 2007 Marius Feraru - 1.36-1.n0i.2 - version 1.36 * Sun Aug 12 2007 Marius Feraru - 1.35-1.n0i.1 - spec file (re)created using N0i::CPAN::RPMizer/1.14.9 - version 1.35