Skip to content

Commit

Permalink
better Mojo::Exception tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 20, 2011
1 parent 12dd053 commit fffb10b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.31 2011-11-21 00:00:00
- Improved tests.

2.30 2011-11-20 00:00:00
- Deprecated Mojo::IOLoop->on_lock in favor of Mojo::IOLoop->lock.
- Deprecated Mojo::IOLoop->on_unlock in favor of
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -32,7 +32,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.30';
our $VERSION = '2.31';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
10 changes: 6 additions & 4 deletions t/mojolicious/exception_lite_app.t
@@ -1,6 +1,8 @@
#!/usr/bin/env perl
use Mojo::Base -strict;

use utf8;

# Disable Bonjour, IPv6 and libev
BEGIN {
$ENV{MOJO_NO_BONJOUR} = $ENV{MOJO_NO_IPV6} = 1;
Expand Down Expand Up @@ -46,7 +48,7 @@ get '/dead_template_with_layout';
get '/dead_action' => sub { die 'dead action!' };

# GET /double_dead_action
get '/double_dead_action' => sub {
get '/double_dead_action_☃' => sub {
eval { die 'double dead action!' };
die $@;
};
Expand Down Expand Up @@ -140,9 +142,9 @@ $t->get_ok('/dead_action.json')->status_is(500)
->content_like(qr|get\ '/dead_action'|)
->content_like(qr/dead\ action!/);

# GET /double_dead_action
$t->get_ok('/double_dead_action')->status_is(500)
->content_like(qr|get\ '/double_dead_action'|)
# GET /double_dead_action_☃
$t->get_ok('/double_dead_action_☃')->status_is(500)
->content_like(qr|get\ '/double_dead_action_☃'.*dead_action_☃|s)
->content_like(qr/double\ dead\ action!/);

# GET /trapped
Expand Down

0 comments on commit fffb10b

Please sign in to comment.