Skip to content

Commit

Permalink
better tests for embedded applications
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 17, 2013
1 parent 9297ce7 commit 344f188
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions t/mojolicious/external/lib/MyApp.pm
Expand Up @@ -14,19 +14,10 @@ sub startup {
}
);

$r->get(
'/test' => sub {
my $self = shift;
$self->render(text => $self->config->{whatever});
}
);
$r->get('/test' => sub { $_->render(text => $_->config->{whatever}) });

$r->get(
'/secondary' => sub {
my $self = shift;
$self->render(text => ++$self->session->{secondary});
}
);
'/secondary' => sub { $_->render(text => ++$_->session->{secondary}) });
}

1;

0 comments on commit 344f188

Please sign in to comment.