Skip to content

Commit

Permalink
better test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 18, 2012
1 parent 3ad201c commit 5e0f887
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/Test/Mojo.pm
Expand Up @@ -452,9 +452,16 @@ Construct a new L<Test::Mojo> object.
Alias for L<Mojo::UserAgent/"app">.
my $secret = $t->app->secret;
# Change log level
$t->app->log->level('fatal');
$t->app->defaults(testing => 'oh yea!');
# Increase inactivity timeout for all connections
$t->app->hook(after_build_tx => sub {
my ($tx, $app) = @_;
$tx->on(connection => sub {
my ($tx, $id) = @_;
Mojo::IOLoop->stream($id)->timeout(0) });
});
=head2 C<content_is>
Expand Down

0 comments on commit 5e0f887

Please sign in to comment.