]> git.pld-linux.org Git - packages/php-pear-Testing_DocTest.git/blame - php-pear-Testing_DocTest.spec
up to 0.6.0
[packages/php-pear-Testing_DocTest.git] / php-pear-Testing_DocTest.spec
CommitLineData
e3a2ade0
ER
1%define status beta
2%define pearname Testing_DocTest
876dfa20 3%include /usr/lib/rpm/macros.php
e3a2ade0
ER
4Summary: %{pearname} - A Unit Test framework for writing tests in your php code docstrings
5Summary(pl.UTF-8): %{pearname} - framework do pisania testów w kodzie php za pomocą docstrings
6Name: php-pear-%{pearname}
7Version: 0.6.0
8Release: 1
876dfa20
AG
9License: MIT
10Group: Development/Languages/PHP
e3a2ade0
ER
11Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz
12# Source0-md5: b6143bc74c19f29368f72957db608c42
876dfa20 13URL: http://pear.php.net/package/Testing_DocTest/
a61ed21b 14BuildRequires: php-pear-PEAR >= 1:1.4.0
876dfa20 15BuildRequires: rpm-php-pearprov >= 4.4.2-11
feb50010 16BuildRequires: rpmbuild(macros) >= 1.300
db2eaee9 17Requires: php(tokenizer)
876dfa20 18Requires: php-pear
a61ed21b 19Requires: php-pear-Console_CommandLine >= 1.0.0-0.RC3
9ed630f2 20Requires: php-pear-PEAR-core >= 1:1.4.0
ddc1a2a0 21Obsoletes: php-pear-Testing_DocTest-tests
876dfa20
AG
22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26Testing_DocTest allows the developer to write unit tests directly in
27the <code></code> blocs of your functions, classes and class methods
28doc comments.
29
30It comes with a default runner (phpdt) that will parse all your
31<code></code> blocs and will run the extracted tests. Running tests is
32as simple as:
33
34$ phpdt /path/to/your/code
35
36There are several advantages in using Testing_DocTest:
37- it makes unit tests writing funnier, easier and quicker (there's no
38 infrastructure to setup, you just install the package, write your code
39 examples tests and you're done !);
40- it ensures that doc comments are up-to-date by verifying that all
41 examples work as documented;
42- it enforces writing of tutorial documentation, liberally illustrated
43 with input-output examples.
44
e3a2ade0 45In PEAR status of this package is: %{status}.
876dfa20
AG
46
47%description -l pl.UTF-8
48Testing_DocTest pozwala developerowi na pisanie testów bezpośrednio
49wewnątrz znaczników <code></code> w komentarzach funkcji, klas i ich
50metod.
51
52Dostarczany jest program (phpdt) który przetworzy bloki <code></code>
53i wykona pobrane testy. Wywołanie jest proste:
54
55$ phpdt /sciezka/do/kodu
56
57Istnieje sporo korzyści z wykorzystania Testing_DocTest:
58- sprawia, że pisanie testów jest prostsze i szybsze (brak
59 infrastruktury do konfiguracji, wystarczy zainstalowanie pakietu i
60 napisanie testu),
61- zapewnia aktualność komentarzy poprzez weryfikację załączonych
62 przykładów,
63- wymusza pisanie dokumentacji, ilustrując za pomocą przykładów
64 wejścia-wyjścia.
65
e3a2ade0 66Ta klasa ma w PEAR status: %{status}.
876dfa20 67
876dfa20
AG
68%prep
69%pear_package_setup
70
71%install
72rm -rf $RPM_BUILD_ROOT
73install -d $RPM_BUILD_ROOT{%{php_pear_dir},%{_bindir}}
74%pear_package_install
75install usr/bin/phpdt $RPM_BUILD_ROOT%{_bindir}
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%files
81%defattr(644,root,root,755)
82%doc install.log
83%attr(755,root,root) %{_bindir}/phpdt
84%{php_pear_dir}/.registry/*.reg
85%{php_pear_dir}/Testing/DocTest
86%{php_pear_dir}/Testing/DocTest.php
This page took 0.085866 seconds and 4 git commands to generate.