Test::Mojo::Plack - Test Plack-compatible applications with Test:Mojo
Version 0.07
use Test::Mojo::Plack; use Test::More; my $foo = Test::Mojo::Plack->new('My::Catalyst::App'); my $foo = Test::Mojo::Plack->new('My::Dancer::App'); $foo->get_ok("/") ->status_is(200) ->content_type_is('text/html') ->text_is('#footer a.author', 'mendoza@pvv.ntnu.no'); done_testing;
Returns a Test::Mojo::Plack object that is a subclass of Test::Mojo
If $app is provided, it tries to set app a PSGI application by guessing the framework of it.
Test::Mojo::Plack inherits all methods from Test::Mojo and overrides the following:
Hijacks the setup and sending of a request to send it to a pre-defined PSGI application.
Nicolas Mendoza, <mendoza at pvv.ntnu.no>
<mendoza at pvv.ntnu.no>
You can find documentation for this module with the perldoc command.
perldoc Test::Mojo::Plack
https://github.com/nicomen/test-mojo-plack
Heavily inspired by Plack::Test and Catalyst::Test and of course Test::Mojo
Copyright 2014 Nicolas Mendoza.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Test::Mojo::Plack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Mojo::Plack
CPAN shell
perl -MCPAN -e shell install Test::Mojo::Plack
For more information on module installation, please visit the detailed CPAN module installation guide.