1 |
%define upstream_name Test-WWW-Mechanize-Mojo |
2 |
%define upstream_version v0.0.17 |
3 |
|
4 |
%{?perl_default_filter} |
5 |
|
6 |
Name: perl-%{upstream_name} |
7 |
Version: %perl_convert_version %{upstream_version} |
8 |
Release: %mkrel 1 |
9 |
|
10 |
Summary: Test::WWW::Mechanize for Mojo / Mojolicious |
11 |
License: GPL+ or Artistic |
12 |
Group: Development/Perl |
13 |
Url: http://search.cpan.org/dist/%{upstream_name} |
14 |
Source0: http://www.cpan.org/modules/by-module/Test/%{upstream_name}-%{upstream_version}.tar.gz |
15 |
|
16 |
BuildRequires: perl(Carp) |
17 |
BuildRequires: perl(Encode) |
18 |
BuildRequires: perl(ExtUtils::MakeMaker) |
19 |
BuildRequires: perl(HTML::Entities) |
20 |
BuildRequires: perl(LWP) >= 5.816.0 |
21 |
BuildRequires: perl(Module::Build) >= 0.360.0 |
22 |
BuildRequires: perl(Mojolicious) >= 4.750.0 |
23 |
BuildRequires: perl(Mojolicious::Lite) |
24 |
BuildRequires: perl(Test::WWW::Mechanize) >= 1.140.0 |
25 |
BuildRequires: perl(WWW::Mechanize) >= 1.500.0 |
26 |
BuildRequires: perl(base) |
27 |
BuildRequires: perl(strict) |
28 |
BuildRequires: perl(utf8) |
29 |
BuildRequires: perl(warnings) |
30 |
BuildArch: noarch |
31 |
|
32 |
%description |
33 |
the Mojo manpage is an MVC Web Application Framework. the |
34 |
Test::WWW::Mechanize manpage is a subclass of the WWW::Mechanize manpage |
35 |
that incorporates features for web application testing. The the |
36 |
Test::WWW::Mechanize::Mojo manpage module meshes the two to allow easy |
37 |
testing of the Mojo manpage applications without needing to starting up a |
38 |
web server. |
39 |
|
40 |
Testing web applications has always been a bit tricky, normally requiring |
41 |
starting a web server for your application and making real HTTP requests to |
42 |
it. This module allows you to test the Mojo manpage web applications but |
43 |
does not require a server or issue HTTP requests. Instead, it passes the |
44 |
HTTP request object directly to the Mojo manpage. Thus you do not need to |
45 |
use a real hostname: "http://localhost/" will do. However, this is |
46 |
optional. The following two lines of code do exactly the same thing: |
47 |
|
48 |
$mech->get_ok('/action'); |
49 |
$mech->get_ok('http://localhost/action'); |
50 |
|
51 |
%prep |
52 |
%setup -q -n %{upstream_name}-%{upstream_version} |
53 |
|
54 |
%build |
55 |
%__perl Makefile.PL INSTALLDIRS=vendor |
56 |
|
57 |
%make |
58 |
|
59 |
%check |
60 |
%make test |
61 |
|
62 |
%install |
63 |
%make_install |
64 |
|
65 |
%files |
66 |
%doc Changes LICENSE META.json META.yml MYMETA.yml README |
67 |
%{_mandir}/man3/* |
68 |
%{perl_vendorlib}/* |