prepared for 5.6900
Marcus Ramberg [Wed, 3 May 2006 10:55:45 +0000 (10:55 +0000)]
Changes
Makefile.PL
lib/Catalyst.pm
t/lib/PluginTestApp.pm [new file with mode: 0644]
t/unit_core_plugin.t

diff --git a/Changes b/Changes
index 092a830..97b4511 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,17 @@
 This file documents the revision history for Perl extension Catalyst.
 
+5.6900   2006-05-03 11.17:00
+        - Stupid pause indexer can't count.
+        - Better fix for Catalyst::Test
+        - more tests.
+
+5.682   2006-04-27 13:51:00
+        - Damn OSX attributes again :( 
+
+5.681   2006-04-27 08:47:00
+        - Updated manifest.
+        - Add basename to core . (Deprecates Catalyst::Plugin::Basename)
+    
 5.68    2006-04-26 12:23:00
         - ConfigLoader: Updated to version 0.06
         - fixed undef warnings in uri_for() and uri_with()
index 3500fab..d1ee89f 100644 (file)
@@ -1,3 +1,4 @@
+
 use inc::Module::Install;
 
 perl_version '5.8.1';
index d6f8e07..73214df 100644 (file)
@@ -61,7 +61,7 @@ __PACKAGE__->engine_class('Catalyst::Engine::CGI');
 __PACKAGE__->request_class('Catalyst::Request');
 __PACKAGE__->response_class('Catalyst::Response');
 
-our $VERSION = '5.678';
+our $VERSION = '5.6900';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -1082,7 +1082,10 @@ that will be dumped on the error page in debug mode.
 
 sub dump_these {
     my $c = shift;
-    [ Request => $c->req ], [ Response => $c->res ], [ Stash => $c->stash ],;
+    [ Request => $c->req ], 
+    [ Response => $c->res ], 
+    [ Stash => $c->stash ],
+    [ Config => $c->config ];
 }
 
 =head2 $c->engine_class
diff --git a/t/lib/PluginTestApp.pm b/t/lib/PluginTestApp.pm
new file mode 100644 (file)
index 0000000..c476736
--- /dev/null
@@ -0,0 +1,67 @@
+package PluginTestApp;
+use Test::More;
+
+use Catalyst qw(
+        Test::Plugin
+        +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 ],
+    [
+        qw/Catalyst::Plugin::Test::Plugin
+        TestApp::Plugin::FullyQualified/
+        ],
+    '... and it should report the correct plugins';
+    ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
+    '... or if we have a particular plugin';
+    ok $c->registered_plugins('Test::Plugin'),
+    '... even if it is not fully qualified';
+    ok !$c->registered_plugins('No::Such::Plugin'),
+    '... and it should return false if the plugin does not exist';
+}
+
+__PACKAGE__->setup;
index e46797a..36c170d 100644 (file)
@@ -16,77 +16,6 @@ use lib 't/lib';
     sub count { $count++ }
 }
 
-{
-
-    package PluginTestApp;
-    use Test::More;
-
-    use Catalyst qw(
-      Test::Plugin
-      +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 ],
-            [
-                qw/Catalyst::Plugin::Test::Plugin
-                   TestApp::Plugin::FullyQualified/
-            ],
-            '... and it should report the correct plugins';
-        ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
-            '... or if we have a particular plugin';
-        ok $c->registered_plugins('Test::Plugin'),
-            '... even if it is not fully qualified';
-        ok !$c->registered_plugins('No::Such::Plugin'),
-            '... and it should return false if the plugin does not exist';
-    }
-
-    __PACKAGE__->setup;
-}
-
 use Catalyst::Test qw/PluginTestApp/;
 
 ok( get("/compile_time_plugins"), "get ok" );