CatalystX-Test-Most
view release on metacpan or search on metacpan
---
abstract: 'Test base pulling in L<Catalyst::Test>, L<Test::More>, L<Test::Fatal>, and L<HTTP::Request::Common> for unit tests on Catalyst applications.'
build_requires:
ExtUtils::MakeMaker: 6.36
configure_requires:
ExtUtils::MakeMaker: 6.36
distribution_type: module
dynamic_config: 1
generated_by: 'Module::Install version 1.06'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: CatalystX-Test-Most
no_index:
directory:
- inc
- t
requires:
Catalyst: 5.8
Catalyst::Action::RenderView: 0
Catalyst::Test: 0
HTTP::Request::Common: 0
Test::Exception: 0
Test::More: 0
Test::WWW::Mechanize::Catalyst: 0
strictures: 0
resources:
license: http://opensource.org/licenses/artistic-license-2.0.php
repository: git://github.com/pangyre/p5-catalystx-test-most
version: 0.05
MYMETA.json view on Meta::CPAN
{
"abstract" : "Test base pulling in L<Catalyst::Test>, L<Test::More>, L<Test::Fatal>, and L<HTTP::Request::Common> for unit tests on Catalyst applications.",
"author" : [
"unknown"
],
"dynamic_config" : 0,
"generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921",
"license" : [
"artistic_2"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
MYMETA.json view on Meta::CPAN
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Catalyst" : "5.8",
"Catalyst::Action::RenderView" : "0",
"Catalyst::Test" : "0",
"HTTP::Request::Common" : "0",
"Test::Exception" : "0",
"Test::More" : "0",
"Test::WWW::Mechanize::Catalyst" : "0",
"strictures" : "0"
}
}
},
"release_status" : "stable",
"version" : "0.05"
}
---
abstract: 'Test base pulling in L<Catalyst::Test>, L<Test::More>, L<Test::Fatal>, and L<HTTP::Request::Common> for unit tests on Catalyst applications.'
author:
- unknown
build_requires:
ExtUtils::MakeMaker: 6.36
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 0
generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921'
license: artistic_2
meta-spec:
version: 1.4
name: CatalystX-Test-Most
no_index:
directory:
- t
- inc
requires:
Catalyst: 5.8
Catalyst::Action::RenderView: 0
Catalyst::Test: 0
HTTP::Request::Common: 0
Test::Exception: 0
Test::More: 0
Test::WWW::Mechanize::Catalyst: 0
strictures: 0
version: 0.05
Makefile.PL view on Meta::CPAN
name "CatalystX-Test-Most";
all_from "lib/CatalystX/Test/Most.pm";
repository "git://github.com/pangyre/p5-catalystx-test-most";
requires "Catalyst" => 5.8;
requires "Catalyst::Action::RenderView" => undef;
requires "Catalyst::Test" => undef;
requires "Test::WWW::Mechanize::Catalyst" => undef;
requires "Test::More" => undef;
requires "HTTP::Request::Common" => undef;
requires "Test::Exception" => undef;
requires "strictures" => undef;
system("pod2text lib/CatalystX/Test/Most.pm > README") == 0
or die "Couldn't update the README file"
if $Module::Install::AUTHOR;
auto_install;
WriteAll;
Name
CatalystX::Test::Most - Test base pulling in Catalyst::Test, Test::More,
Test::Fatal, and HTTP::Request::Common for unit tests on Catalyst
applications.
Synopsis
use CatalystX::Test::Most "MyApp";
subtest "Tests with plain Catalyst::Test" => sub {
ok request("/")->is_success, "/ is okay";
is exception { request("/no-such-uri") }, undef,
"404s do not throw exceptions";
is request("/no-such-uri")->code, 404, "And do return 404";
lib/CatalystX/Test/Most.pm view on Meta::CPAN
package CatalystX::Test::Most;
use strictures;
no warnings "uninitialized";
use HTTP::Request::Common ( qw{ GET POST DELETE PUT } );
use Test::More;
use Test::Fatal;
our $AUTHORITY = "cpan:ASHLEY";
our $VERSION = "0.05";
our @EXPORT = ( qw{ GET POST DELETE PUT },
qw{ request ctx_request action_redirect },
qw{ exception },
qw{ ctx mech },
grep { defined &{$_} } @Test::More::EXPORT );
lib/CatalystX/Test/Most.pm view on Meta::CPAN
require Catalyst::Test;
Catalyst::Test->import($App, $Args);
{
no strict "refs";
*{"${calling_package}::$_"} = \&{$_} for @EXPORT;
}
}
# delete is obviously a problem and the rest should maybe be the uc
# anyway and not export the HTTP::Request::Common ones or something new?
#sub get { request( GET( @_ ) ); }
#sub put { request( PUT( @_ ) ); }
#sub post { request( POST( @_ ) ); }
#sub delete { request( DELETE( @_ ) ); }
sub ctx { [ ctx_request(@_) ]->[1] }
# No args means function call.
sub mech {
my $self = shift if $_[0] eq __PACKAGE__; # Toss it.
lib/CatalystX/Test/Most.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 Name
CatalystX::Test::Most - Test base pulling in L<Catalyst::Test>, L<Test::More>, L<Test::Fatal>, and L<HTTP::Request::Common> for unit tests on Catalyst applications.
=head1 Synopsis
use CatalystX::Test::Most "MyApp";
subtest "Tests with plain Catalyst::Test" => sub {
ok request("/")->is_success, "/ is okay";
is exception { request("/no-such-uri") }, undef,
"404s do not throw exceptions";
is request("/no-such-uri")->code, 404, "And do return 404";
( run in 0.318 second using v1.01-cache-2.11-cpan-de7293f3b23 )