X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestAppPluginWithConstructor.pm;h=faa1f9c76b67da89a8e24f35eaab5c71c435eacf;hb=f6ddb2f242a1635b4a5ba848f61d87c1093422dc;hp=36d8e16784bdae6b80ad17d9298e7debbed552f5;hpb=bca6bdad36357e75b0efdcd92bc25f32c07182cd;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestAppPluginWithConstructor.pm b/t/lib/TestAppPluginWithConstructor.pm index 36d8e16..faa1f9c 100644 --- a/t/lib/TestAppPluginWithConstructor.pm +++ b/t/lib/TestAppPluginWithConstructor.pm @@ -1,22 +1,17 @@ # See t/plugin_new_method_backcompat.t package TestAppPluginWithConstructor; use Test::More; -use Test::Exception; +use Test::Fatal; use Catalyst qw/+TestPluginWithConstructor/; use Moose; -BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME. - -sub foo : Local { - my ($self, $c) = @_; - $c->res->body('foo'); -} +extends qw/Catalyst/; __PACKAGE__->setup; our $MODIFIER_FIRED = 0; -lives_ok { +is exception { before 'dispatch' => sub { $MODIFIER_FIRED = 1 } -} 'Can apply method modifier'; +}, undef, 'Can apply method modifier'; no Moose; our $IS_IMMUTABLE_YET = __PACKAGE__->meta->is_immutable;