[Catalyst-commits] r10597 - Catalyst-Runtime/5.80/trunk/t

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Jun 19 20:41:47 GMT 2009


Author: t0m
Date: 2009-06-19 20:41:46 +0000 (Fri, 19 Jun 2009)
New Revision: 10597

Modified:
   Catalyst-Runtime/5.80/trunk/t/unit_core_plugin.t
Log:
Remove MockObject

Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_plugin.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_plugin.t	2009-06-19 20:39:58 UTC (rev 10596)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_plugin.t	2009-06-19 20:41:46 UTC (rev 10597)
@@ -2,7 +2,6 @@
 
 use strict;
 use warnings;
-use Test::MockObject::Extends;
 
 use Test::More tests => 24;
 
@@ -20,15 +19,18 @@
 my $warnings = 0;
 
 use PluginTestApp;
-my $logger = Test::MockObject::Extends->new(PluginTestApp->log);
-$logger->mock('warn', sub {
-    if ($_[1] =~ /plugin method is deprecated/) {
-        $warnings++;
-        return;
-    }
-    die "Caught unexpected warning: " . $_[1];
-});
-#PluginTestApp->log($logger);
+my $logger = Class::MOP::Class->create_anon_class(
+    methods => {
+        warn => sub {
+            if ($_[1] =~ /plugin method is deprecated/) {
+               $warnings++;
+                return;
+            }
+            die "Caught unexpected warning: " . $_[1];
+        },
+    },
+)->new_object;
+PluginTestApp->log($logger);
 
 use Catalyst::Test qw/PluginTestApp/;
 




More information about the Catalyst-commits mailing list