pangyre / p5-catalystx-test-most Goto Github PK
View Code? Open in Web Editor NEWCatalystX::Test::Most -- Catalyst::Test + HTTP::Request::Common + Test::More + Test::Fatal + ...
CatalystX::Test::Most -- Catalyst::Test + HTTP::Request::Common + Test::More + Test::Fatal + ...
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"; }; subtest "Tests with Test::WWW::Mechanize::Catalyst" => sub { my $mech = mech(); $mech->get_ok("/", "GET /"); $mech->content_contains("OHAI", "That's my app all right"); }; done_testing(); # ok 1 - / is okay # ok 2 - 404s do not throw exceptions # ok 3 - And do return 404 # 1..3 # ok 2 - Tests with plain Catalyst::Test # ok 1 - GET / # ok 2 - My app all right # 1..2 # ok 3 - Tests with Test::WWW::Mechanize::Catalyst Exported Functions from Other Packages Catalyst::Test Everything, so see its documentation: Catalyst::Test. CatalystX::Test::Most is basically an overloaded version of it. Test::More All of its exported functions; see its documentation: Test::More. Test::Fatal See "exception" in Test::Fatal. Test::WWW::Mechanize::Catalyst You have easy access to a Test::WWW::Mechanize::Catalyst object. There are no related functions, just the object methods. New Functions * "ctx" This is a wrapper to get the context object. It will only work on local tests (not remote servers). * "mech" Get a Test::WWW::Mechanize::Catalyst object. Unless specified, the app name and the arguments are recycled from the "import" of CatalystX::Test::Most. Notes strictures are exported. Copyright and License Ashley Pond V. Artistic License 2.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.