[Catalyst-commits] r11947 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t:
aggregate lib/PluginTestApp/Controller
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Fri Nov 20 18:00:36 GMT 2009
Author: zby
Date: 2009-11-20 18:00:35 +0000 (Fri, 20 Nov 2009)
New Revision: 11947
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/aggregate/unit_core_plugin.t
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/PluginTestApp/Controller/Root.pm
Log:
no runtime plugins; _test_plugins is method on application now
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/aggregate/unit_core_plugin.t
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/aggregate/unit_core_plugin.t 2009-11-20 15:22:04 UTC (rev 11946)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/aggregate/unit_core_plugin.t 2009-11-20 18:00:35 UTC (rev 11947)
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 24;
+use Test::More tests => 11;
use lib 't/lib';
@@ -38,14 +38,9 @@
ok( get("/compile_time_plugins"), "get ok" );
is( $warnings, 0, 'no warnings' );
-# FIXME - Run time plugin support is insane, and should be removed
-# for Catalyst 5.9
-ok( get("/run_time_plugins"), "get ok" );
local $ENV{CATALYST_DEBUG} = 0;
-is( $warnings, 1, '1 warning' );
-
use_ok 'TestApp';
my @expected = qw(
Catalyst::Plugin::Test::Errors
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/PluginTestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/PluginTestApp/Controller/Root.pm 2009-11-20 15:22:04 UTC (rev 11946)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/PluginTestApp/Controller/Root.pm 2009-11-20 18:00:35 UTC (rev 11947)
@@ -3,11 +3,6 @@
use base 'Catalyst::Controller';
-#use Catalyst qw(
-# Test::Plugin
-# +TestApp::Plugin::FullyQualified
-# );
-
__PACKAGE__->config->{namespace} = '';
sub compile_time_plugins : Local {
@@ -17,39 +12,9 @@
isa_ok $c->application, 'TestApp::Plugin::FullyQualified';
can_ok $c, 'registered_plugins';
- $c->_test_plugins;
+ $c->application->_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;
-
- ref($c)->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");
-}
-
1;
More information about the Catalyst-commits
mailing list