X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FPluginTestApp.pm;fp=t%2Flib%2FPluginTestApp.pm;h=1031586f01c4697ea7457f8636d50958050a6097;hp=c476736008f955d417e5b7d353d1177a8f54e24e;hb=9d04b6857491ce04e79cf93bdd45727e052ad6e6;hpb=f15ff320402420ecfdf793cf63671da0c104bf6f diff --git a/t/lib/PluginTestApp.pm b/t/lib/PluginTestApp.pm index c476736..1031586 100644 --- a/t/lib/PluginTestApp.pm +++ b/t/lib/PluginTestApp.pm @@ -6,48 +6,6 @@ use Catalyst qw( +TestApp::Plugin::FullyQualified ); -sub compile_time_plugins : Local { - my ( $self, $c ) = @_; - - isa_ok $c, 'Catalyst::Plugin::Test::Plugin'; - isa_ok $c, 'TestApp::Plugin::FullyQualified'; - - can_ok $c, 'registered_plugins'; - $c->_test_plugins; - - $c->res->body("ok"); -} - -sub run_time_plugins : Local { - my ( $self, $c ) = @_; - - $c->_test_plugins; - my $faux_plugin = 'Faux::Plugin'; - -# Trick perl into thinking the plugin is already loaded - $INC{'Faux/Plugin.pm'} = 1; - - __PACKAGE__->plugin( faux => $faux_plugin ); - - isa_ok $c, 'Catalyst::Plugin::Test::Plugin'; - isa_ok $c, 'TestApp::Plugin::FullyQualified'; - ok !$c->isa($faux_plugin), - '... and it should not inherit from the instant plugin'; - can_ok $c, 'faux'; - is $c->faux->count, 1, '... and it should behave correctly'; - is_deeply [ $c->registered_plugins ], - [ - qw/Catalyst::Plugin::Test::Plugin - Faux::Plugin - TestApp::Plugin::FullyQualified/ - ], - 'registered_plugins() should report all plugins'; - ok $c->registered_plugins('Faux::Plugin'), - '... and even the specific instant plugin'; - - $c->res->body("ok"); -} - sub _test_plugins { my $c = shift; is_deeply [ $c->registered_plugins ],