Commit | Line | Data |
---|---|---|
6a8f85af | 1 | # See t/plugin_new_method_backcompat.t |
2 | package TestAppPluginWithConstructor; | |
3 | use Test::Exception; | |
4 | use Catalyst qw/+TestPluginWithConstructor/; | |
5 | use Moose; | |
6 | BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME. | |
7 | ||
8 | sub foo : Local { | |
9 | my ($self, $c) = @_; | |
10 | $c->res->body('foo'); | |
11 | } | |
12 | ||
13 | __PACKAGE__->setup; | |
14 | our $MODIFIER_FIRED = 0; | |
15 | ||
16 | lives_ok { | |
17 | before 'dispatch' => sub { $MODIFIER_FIRED = 1 } | |
18 | } 'Can apply method modifier'; | |
19 | no Moose; | |
20 | ||
21 | 1; | |
22 |